PageRenderTime 52ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/toolkit/src/rid/testing/testing.ksh

https://github.com/mdsmus/humdrum
Korn Shell | 93 lines | 54 code | 18 blank | 21 comment | 0 complexity | ceb16bc3679ecacef749c8ab9ad8f313 MD5 | raw file
Possible License(s): BSD-3-Clause
  1. #
  2. # Perform these commands:
  3. #
  4. # Test -D option
  5. echo "Checking result01"
  6. rid -D test01 > output
  7. diff output result01
  8. # Test -G option
  9. echo "Checking result02"
  10. rid -G test01 > output
  11. diff output result02
  12. # Test -I option
  13. echo "Checking result03"
  14. rid -I test01 > output
  15. diff output result03
  16. # Test -L option
  17. echo "Checking result04"
  18. rid -L test01 > output
  19. diff output result04
  20. # Test -d option
  21. echo "Checking result05"
  22. rid -d test01 > output
  23. diff output result05
  24. # Test -g option
  25. echo "Checking result06"
  26. rid -g test01 > output
  27. diff output result06
  28. # Test -i option
  29. echo "Checking result07"
  30. rid -i test01 > output
  31. diff output result07
  32. # Test -l option
  33. echo "Checking result08"
  34. rid -l test01 > output
  35. diff output result08
  36. # Test all options together
  37. echo "Checking result09"
  38. rid -dgilDGIL test01 > output
  39. diff output result09
  40. # Test on a totally empty file
  41. echo "Checking result10"
  42. rid -dgil test02 > output
  43. diff output result10
  44. # Test on standard input
  45. echo "Checking result11"
  46. cat test01 test03 | rid -GL - > output
  47. diff output result11
  48. # Test 2 files specified on command line
  49. echo "Checking result12"
  50. rid -GL test01 test03 > output
  51. diff output result12
  52. # A test of --
  53. echo "Checking result13"
  54. rid -GL -- -test13 > output
  55. diff output result13
  56. # test14 contains only global comments
  57. echo "Checking result14"
  58. rid -G test14 > output
  59. diff output result14
  60. # A test of -U and -u options
  61. echo "Checking result15"
  62. rid -U test15 > output
  63. diff output result15
  64. # Another test of -U and -u options
  65. echo "Checking result16"
  66. rid -u test16 > output
  67. diff output result16
  68. # A test of -T option
  69. echo "Checking result17"
  70. rid -T test17 > output
  71. diff output result17
  72. # A test of -U with -T option
  73. echo "Checking result18"
  74. rid -U -T test18 > output
  75. diff output result18