Created
March 5, 2016 21:51
-
-
Save 0xTenable/8694cf6bd079b7057955 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script to test all options for PA4 | |
count=0 | |
args=(-h -u -d -D -c -i -s -S -x -sc) | |
inputfile="test.txt" | |
echo "\n------------------- BEGIN SCRIPT ---------------------" | |
for option in "${args[@]}" | |
do | |
echo "\n------------- TEST $count Option: $option -----------------\n" | |
~/../public/pa4test "${option}" "${inputfile}" &> s | |
./myuniq "${option}" "${inputfile}" &> o | |
DIFF=$(diff s o) | |
if [ "$DIFF" == "" ] | |
then | |
echo "TEST PASSED" | |
else | |
echo "${DIFF}" | |
fi | |
count=$(expr $count + 1) | |
done | |
echo "\n------------------- END SCRIPT ---------------------" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment