home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.pdx.edu / 2014.02.ftp.ee.pdx.edu.tar / ftp.ee.pdx.edu / pub / users / Harry / compilers / p3 / run < prev    next >
Text File  |  2005-10-19  |  604b  |  27 lines

  1. #!/bin/sh
  2. #
  3. # Use this shell script to test your program.
  4. #
  5. # Use this script from a directory that contains the "*.class" files and a
  6. # subdirectory "tst" containing files such as
  7. #    test01.pcat
  8. #    test01.out.bak
  9. #    test01.err.bak
  10. #
  11. # Type:
  12. #    run test01
  13. #
  14. # It will first run "main" to create files:
  15. #    test01.out
  16. #    test01.err
  17. #
  18. # It will then print any differences between your output/error files
  19. # and the pre-existing ".bak" output/error files.
  20. #
  21. echo $1:
  22. java Main < tst/$1.pcat 1> tst/$1.out 2> tst/$1.err
  23. diff -w tst/$1.out.bak tst/$1.out
  24. diff -w tst/$1.err.bak tst/$1.err
  25. rm tst/$1.out
  26. rm tst/$1.err
  27.