aboutsummaryrefslogtreecommitdiff
path: root/paludis/version_spec_TEST.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/version_spec_TEST.cc')
-rw-r--r--paludis/version_spec_TEST.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/paludis/version_spec_TEST.cc b/paludis/version_spec_TEST.cc
index da974dfb4..46a28b63b 100644
--- a/paludis/version_spec_TEST.cc
+++ b/paludis/version_spec_TEST.cc
@@ -141,6 +141,24 @@ namespace test_cases
} test_version_spec_star_compare;
/**
+ * \test VersionSpec tilde comparisons
+ *
+ * \ingroup grptestcases
+ */
+ struct VersionSpecTildeCompareTest : TestCase
+ {
+ VersionSpecTildeCompareTest() : TestCase("version spec tilde compare") {}
+
+ void run()
+ {
+ TEST_CHECK(VersionSpec("1.2").tilde_compare(VersionSpec("1.2")));
+ TEST_CHECK(VersionSpec("1.2").tilde_compare(VersionSpec("1.2-r1")));
+ TEST_CHECK(! VersionSpec("1.2").tilde_compare(VersionSpec("1.3")));
+ TEST_CHECK(VersionSpec("1.2-r1").tilde_compare(VersionSpec("1.2-r2")));
+ }
+ } test_version_spec_tilde_compare;
+
+ /**
* \test VersionSpec remove revision
*
* \ingroup grptestcases