Skip to content
Snippets Groups Projects
Commit 7eb9ede0 authored by raila's avatar raila
Browse files

More prep for 2.0.1:

* Fix version number test so that it accepts "2.0.1rc1".
* Add missing type_checkers.py to Makefile.am.
parent e6dd6fa3
No related branches found
No related tags found
No related merge requests found
...@@ -84,6 +84,7 @@ EXTRA_DIST = \ ...@@ -84,6 +84,7 @@ EXTRA_DIST = \
python/google/protobuf/internal/service_reflection_test.py \ python/google/protobuf/internal/service_reflection_test.py \
python/google/protobuf/internal/test_util.py \ python/google/protobuf/internal/test_util.py \
python/google/protobuf/internal/text_format_test.py \ python/google/protobuf/internal/text_format_test.py \
python/google/protobuf/internal/type_checkers.py \
python/google/protobuf/internal/wire_format.py \ python/google/protobuf/internal/wire_format.py \
python/google/protobuf/internal/wire_format_test.py \ python/google/protobuf/internal/wire_format_test.py \
python/google/protobuf/internal/__init__.py \ python/google/protobuf/internal/__init__.py \
......
...@@ -37,11 +37,12 @@ namespace { ...@@ -37,11 +37,12 @@ namespace {
TEST(VersionTest, VersionMatchesConfig) { TEST(VersionTest, VersionMatchesConfig) {
// Verify that the version string specified in config.h matches the one // Verify that the version string specified in config.h matches the one
// in common.h. The config.h version is a string which may have a suffix // in common.h. The config.h version is a string which may have a suffix
// like "beta", so we remove that. // like "beta" or "rc1", so we remove that.
string version = PACKAGE_VERSION; string version = PACKAGE_VERSION;
int pos = version.size(); int pos = 0;
while (pos > 0 && !ascii_isdigit(version[pos-1])) { while (pos < version.size() &&
--pos; (ascii_isdigit(version[pos]) || version[pos] == '.')) {
++pos;
} }
version.erase(pos); version.erase(pos);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment