apk-tools/test/version.sh

18 lines
300 B
Bash
Raw Normal View History

#!/bin/sh
fail=0
cat version.data | 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
2021-08-07 12:33:23 +00:00
if [ "$fail" = "0" ]; then
echo "OK: version checking works"
fi
exit $fail