Advertisement
Malinovsky239

test.cmd

Oct 12th, 2013
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. :loop    
  3. gen.exe > input.txt
  4. wa.exe < input.txt > wa_output.txt
  5. correct.exe < input.txt > output.txt
  6. fc output.txt wa_output.txt
  7. if errorlevel 1 exit
  8. goto loop
  9.  
  10. rem comments:
  11. rem 1. switch commands output off
  12. rem 2-8. infinite cycle. loop - name of the variable. May differ from loop
  13. rem 3. generate test and write it to input.txt
  14. rem 4-5. run wa solution and correct solution
  15. rem on test saved in input.txt. The first program outputs result in wa_output.txt,
  16. rem the second - in output.txt
  17. rem 6. compare files output.txt and wa_output.txt (fc = file compare)
  18. rem 7. check if files are different. If so, exit script
  19. rem (so this test, on which wa solution works in a wrong way, will be saved in input.txt)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement