diff options
author | Dan McGee <dan@archlinux.org> | 2011-01-10 17:44:25 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-01-22 02:30:45 +0100 |
commit | 5c46ba14f780474e2b04b54aa7b0c8bf60de2b5b (patch) | |
tree | c23d85821ee893c92e72e565454a9d4f2559a16e /test | |
parent | e068b58507ad58e2037aeb323a74d27377a0feac (diff) | |
download | pacman-5c46ba14f780474e2b04b54aa7b0c8bf60de2b5b.tar.gz pacman-5c46ba14f780474e2b04b54aa7b0c8bf60de2b5b.tar.xz |
Allow version comparison to contain epoch specifier
Adapting from RPM, follow the [epoch:]version[-release] syntax. We can also
borrow some of their parsing code for our purposes (thanks!). Add some new
tests to our vercmp shell script tester for epoch comparisons, and then make
the code work with these newfangled epoch specifiers.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'test')
-rwxr-xr-x | test/util/vercmptest.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/util/vercmptest.sh b/test/util/vercmptest.sh index fca06578..a9ed3b2a 100755 --- a/test/util/vercmptest.sh +++ b/test/util/vercmptest.sh @@ -118,6 +118,25 @@ runtest 1.5.1 1.5.b 1 runtest 1.5.b-1 1.5.b 0 runtest 1.5-1 1.5.b -1 +# epoch included version comparisons +runtest 0:1.0 0:1.0 0 +runtest 0:1.0 0:1.1 -1 +runtest 1:1.0 0:1.0 1 +runtest 1:1.0 0:1.1 1 +runtest 1:1.0 2:1.1 -1 + +# epoch + sometimes present pkgrel +runtest 1:1.0 0:1.0-1 1 +runtest 1:1.0-1 0:1.1-1 1 + +# epoch included on one version +runtest 0:1.0 1.0 0 +runtest 0:1.0 1.1 -1 +runtest 0:1.1 1.0 1 +runtest 1:1.0 1.0 1 +runtest 1:1.0 1.1 1 +runtest 1:1.1 1.1 1 + #END TESTS echo |