Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #! bin/bash
  2.  
  3. #! Edit if necessary:
  4. TESTED_EXEC=./set #!Path to tested executable
  5.  
  6. #Do not edit past this point
  7. IN_PATH=./testy/in/
  8. OUT_PATH=./testy/out/
  9. NO_COMPLAINTS=1
  10.  
  11. for i in $(seq 1 1000); do
  12. DF=$($TESTED_EXEC < $IN_PATH"in"$i".in" | diff -q $OUT_PATH"out"$i".out" -);
  13. if [ "$DF" ]; then
  14. echo "Error in test "$i
  15. NO_COMPLAINTS=0
  16. fi
  17. done
  18.  
  19. if [ $NO_COMPLAINTS -eq 1 ];
  20. then
  21. echo "All tests completed, no problems found"
  22. else
  23. echo "All tests completed, there were mistakes, proper code is in another castle!"
  24. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement