home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / gnu / gperf / dotest.g < prev    next >
Text File  |  1993-07-30  |  2KB  |  46 lines

  1. #
  2. # gulam script for testing gperf
  3. #
  4. echo "performing some tests of the perfect hash generator"   
  5. gcc -v -c -O test.c
  6. ..\gperf -p -c -l -S1 -C -o c.gpf >cinset.c
  7. gcc -v -O -o cout cinset.c test.o
  8. echo "testing ANSI C reserved words, all items should be found in the set"
  9. .\cout -v <c.gpf >output.c
  10. diff -c -b expc output.c
  11. ..\gperf '-k1,4,$' ada.gpf >adainset.c
  12. gcc -v -O -o aout adainset.c test.o
  13. echo "testing Ada reserved words,all items should be found in the set"
  14. .\aout -v <ada.gpf >outares
  15. diff -c -b expares outares
  16. ..\gperf -p -D '-k1,$' -s 2 -o adadefs.gpf >preinset.c
  17. gcc -v -O -o preout preinset.c test.o
  18. echo "testing Ada predefined words, all items should be found in the set"
  19. .\preout -v <adadefs.gpf >outapred
  20. diff -c -b expapred outapred
  21. ..\gperf '-k1,2,$' -o modula3.gpf >m3inset.c
  22. gcc -v -O -o m3out m3inset.c test.o
  23. echo "testing Modula3 reserved words, all items should be found in the set"
  24. .\m3out -v <modula3.gpf >outmod
  25. diff -c -b expmod outmod
  26. ..\gperf -o -S2 -p <pascal.gpf >pinset.c
  27. gcc -v -O -o pout pinset.c test.o
  28. echo "testing Pascal reserved words, all items should be found in the set"
  29. .\pout -v <pascal.gpf >outpas
  30. diff -c -b exppas outpas
  31. ..\gperf -p -j1 -g -o -t -N is_reserved_word '-k1,3,$' c-parse.gpf >testout.1
  32. diff -c -b expout.1 testout.1
  33. ..\gperf -n -k1-8 -l modula2.gpf >testout.2
  34. diff -c -b expout.2 testout.2
  35. ..\gperf -p -j 1 -o -a -g -t '-k1,4,$' gplus.gpf >testout.3
  36. diff -c -b expout.3 testout.3
  37. ..\gperf -D -p -t <c-parse.gpf >testout.4
  38. diff -c -b expout.4 testout.4
  39. ..\gperf -g -o -j1 -t -p -N is_reserved_word gpc.gpf >testout.5
  40. diff -c -b expout.5 testout.5
  41. ..\gperf -h >testout.6 2>&1
  42. diff -c -b expout.6 testout.6
  43. echo "only if, do, for, case, goto, else, while, and return should be found "
  44. .\aout -v <c.gpf >testout.7
  45. diff -c -b expout.7 testout.7
  46.