Adding test script
This commit is contained in:
parent
cf04e7a8a4
commit
2bfcc74b5a
1 changed files with 24 additions and 0 deletions
24
test.sh
Executable file
24
test.sh
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
echo "usage: $(basename ${0}) <ascii armor key file>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
asc_key="$1"
|
||||||
|
|
||||||
|
./asc2qr.sh "${asc_key}"
|
||||||
|
|
||||||
|
./qr2asc.sh QR*.png
|
||||||
|
|
||||||
|
diff "${asc_key}" "./mykey.asc"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "Diff Test: PASS"
|
||||||
|
else
|
||||||
|
echo "Diff Test: FAIL"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm ./QR*.png
|
||||||
|
rm ./mykey.asc
|
Loading…
Reference in a new issue