summaryrefslogtreecommitdiff
path: root/test/version.sh
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-11-06 13:20:30 +0200
committerTimo Teras <timo.teras@iki.fi>2009-11-06 13:20:30 +0200
commit48930b9fe0fdd8b0a4d6e722992f99fa95b1399f (patch)
tree25d4a2d6b73cbe937593731b1c7c692562570a51 /test/version.sh
parenta93a35eecaf580d97f6a451d7e951be0ff18372c (diff)
downloadapk-tools-48930b9fe0fdd8b0a4d6e722992f99fa95b1399f.tar.gz
apk-tools-48930b9fe0fdd8b0a4d6e722992f99fa95b1399f.tar.bz2
apk-tools-48930b9fe0fdd8b0a4d6e722992f99fa95b1399f.tar.xz
apk-tools-48930b9fe0fdd8b0a4d6e722992f99fa95b1399f.zip
test: add test cases for version comparing
so i don't get to break version compares again.
Diffstat (limited to 'test/version.sh')
-rwxr-xr-xtest/version.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/version.sh b/test/version.sh
new file mode 100755
index 0000000..e01b674
--- /dev/null
+++ b/test/version.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+fail=0
+while read a result b rest ; do
+ output="$(../src/apk version -t "$a" "$b")"
+ if [ "$output" != "$result" ] ; then
+ echo "$a $result $b, but got $output"
+ fail=$(($fail+1))
+ fi
+done
+
+exit $fail
+