summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/version.data4
-rwxr-xr-xtest/version.sh8
2 files changed, 9 insertions, 3 deletions
diff --git a/test/version.data b/test/version.data
index bb1aa9e..8db0b45 100644
--- a/test/version.data
+++ b/test/version.data
@@ -727,3 +727,7 @@
1.0_p10-r0 > 1.0_p9-r0
0.1.0_alpha_pre2 < 0.1.0_alpha
1.0.0_pre20191002222144-r0 < 1.0.0_pre20210530193627-r0
+6.0_pre1 < 6.0
+6.1_pre1 < 6.1
+6.0_p1 > 6.0
+6.1_p1 > 6.1
diff --git a/test/version.sh b/test/version.sh
index 18199a6..f639e19 100755
--- a/test/version.sh
+++ b/test/version.sh
@@ -1,16 +1,18 @@
#!/bin/sh
fail=0
-cat version.data | while read a result b rest ; do
+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))
+ fail=$((fail+1))
fi
-done
+done < version.data
if [ "$fail" == "0" ]; then
echo "OK: version checking works"
+else
+ echo "FAIL: $fail version checks failed"
fi
exit $fail