aboutsummaryrefslogtreecommitdiff
path: root/tests/package-version/driver.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-02-15 15:12:52 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-02-15 15:12:52 +0300
commitb1f2974a32e63e0ce805abb5f56bdfe47b890a34 (patch)
tree5924690159263f58f7d267729001e8933372e37e /tests/package-version/driver.cxx
parentc110a0c40e304093e0a19f94c8c5b941ca62ca03 (diff)
Add some package version test cases
Diffstat (limited to 'tests/package-version/driver.cxx')
-rw-r--r--tests/package-version/driver.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/package-version/driver.cxx b/tests/package-version/driver.cxx
index cd180ce..e81115a 100644
--- a/tests/package-version/driver.cxx
+++ b/tests/package-version/driver.cxx
@@ -357,6 +357,11 @@ namespace bpkg
assert (version ("1.0-alpha") > version ("1.0-1"));
assert (version ("1.0-alpha") == version ("1.0-alpha.0"));
+ assert (version ("1.1.1-a.0.1") < version ("1.1.1"));
+ assert (version ("1.1.1") < version ("1.1.1a"));
+ assert (version ("1.1.1a") < version ("1.1.1a+1"));
+ assert (version ("1.1.1a+1") < version ("1.1.1b"));
+
assert (version (1, "2.0", nullopt, 3, 0) == version ("+1-2+3"));
assert (version (1, "2.0", string (), 0, 0) == version ("+1-2-"));
assert (version (0, "", string (), 0, 0) == version ());