Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! bin/bash
- #! Edit if necessary:
- TESTED_EXEC=./set #!Path to tested executable
- #Do not edit past this point
- IN_PATH=./testy/in/
- OUT_PATH=./testy/out/
- NO_COMPLAINTS=1
- for i in $(seq 1 1000); do
- DF=$($TESTED_EXEC < $IN_PATH"in"$i".in" | diff -q $OUT_PATH"out"$i".out" -);
- if [ "$DF" ]; then
- echo "Error in test "$i
- NO_COMPLAINTS=0
- fi
- done
- if [ $NO_COMPLAINTS -eq 1 ];
- then
- echo "All tests completed, no problems found"
- else
- echo "All tests completed, there were mistakes, proper code is in another castle!"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement