aboutsummaryrefslogtreecommitdiff
path: root/paludis/version_spec_TEST.cc
diff options
context:
space:
mode:
authorAvatar Piotr Jaroszyński <peper@gentoo.org> 2007-05-01 18:45:42 +0000
committerAvatar Piotr Jaroszyński <peper@gentoo.org> 2007-05-01 18:45:42 +0000
commit4d2bf9d69120b4b22a1047bc427e4f830e37ad5d (patch)
treec62b30d741d4fbd233535730f348534faca9f41b /paludis/version_spec_TEST.cc
parent9fa88c9471a370de91d705f8ff39333971751a38 (diff)
downloadpaludis-4d2bf9d69120b4b22a1047bc427e4f830e37ad5d.tar.gz
paludis-4d2bf9d69120b4b22a1047bc427e4f830e37ad5d.tar.xz
VersionSpec now uses strings.
Diffstat (limited to 'paludis/version_spec_TEST.cc')
-rw-r--r--paludis/version_spec_TEST.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/paludis/version_spec_TEST.cc b/paludis/version_spec_TEST.cc
index 2b28a12a7..1c0aa8615 100644
--- a/paludis/version_spec_TEST.cc
+++ b/paludis/version_spec_TEST.cc
@@ -91,7 +91,6 @@ namespace test_cases
TEST_CHECK_THROWS(VersionSpec v1("1_pre-r2b"), BadVersionSpecError);
TEST_CHECK_THROWS(VersionSpec v1("1_pre-r2-r2"), BadVersionSpecError);
TEST_CHECK_THROWS(VersionSpec v1("1-r2_pre"), BadVersionSpecError);
- TEST_CHECK_THROWS(VersionSpec v1("10000000000000000000000000000000000000000000000000000"), BadVersionSpecError);
}
} test_version_spec_reject;
@@ -223,6 +222,9 @@ namespace test_cases
TEST_CHECK_STRINGIFY_EQUAL(VersionSpec("1.2-r99").bump(), "2");
TEST_CHECK_STRINGIFY_EQUAL(VersionSpec("1.2.3").bump(), "1.3");
TEST_CHECK_STRINGIFY_EQUAL(VersionSpec("1").bump(), "2");
+ TEST_CHECK_STRINGIFY_EQUAL(VersionSpec("1.99.0").bump(), "1.100");
+ TEST_CHECK_STRINGIFY_EQUAL(VersionSpec("1.099.0").bump(), "1.100");
+ TEST_CHECK_STRINGIFY_EQUAL(VersionSpec("1.0099.0").bump(), "1.0100");
TEST_CHECK_STRINGIFY_EQUAL(VersionSpec("scm").bump(), "scm");
}
} test_version_bump;
@@ -311,12 +313,13 @@ namespace test_cases
TEST_CHECK(VersionSpec("1.00") == VersionSpec("1.0"));
TEST_CHECK(VersionSpec("1.0100") == VersionSpec("1.010"));
TEST_CHECK(VersionSpec("1") == VersionSpec("1-r0"));
+ TEST_CHECK(VersionSpec("1-r00") == VersionSpec("1-r0"));
TEST_CHECK(VersionSpec("1.2") == VersionSpec("1.2-r"));
TEST_CHECK(VersionSpec("1.2-r3") == VersionSpec("1.2-r3.0"));
TEST_CHECK(VersionSpec("1.2") == VersionSpec("1.2-r0.0"));
TEST_CHECK(VersionSpec("1_alpha_beta-scm") == VersionSpec("1_alpha0_beta-scm"));
- TEST_CHECK(VersionSpec("1_alpha_beta0_rc3-scm") == VersionSpec("1_alpha0_beta_rc3-scm"));
+ TEST_CHECK(VersionSpec("1_alpha_beta000_rc3-scm") == VersionSpec("1_alpha00_beta_rc3-scm"));
TEST_CHECK(VersionSpec("0001").hash_value() == VersionSpec("1").hash_value());
TEST_CHECK(VersionSpec("01").hash_value() == VersionSpec("001").hash_value());
@@ -386,6 +389,7 @@ namespace test_cases
v.push_back(VersionSpec("1.2_alpha"));
v.push_back(VersionSpec("1.2_alpha-scm"));
v.push_back(VersionSpec("1.2_beta"));
+ v.push_back(VersionSpec("1.2_beta_p0-scm"));
v.push_back(VersionSpec("1.2_beta_p1-scm"));
v.push_back(VersionSpec("1.2_beta_p-scm"));
v.push_back(VersionSpec("1.2_beta1_p-scm"));