run.sh 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/bash
  2. set -eo pipefail
  3. os="unix"
  4. if [[ "$MACHINE" == "Windows" ]]; then
  5. os="win"
  6. fi
  7. bash ../scripts/compile src/case-nval.cpp
  8. for i in files/"$os"/case-nval/*; do
  9. j=$(basename $i)
  10. bash ../scripts/test-ref r-case-nval-$j "$VALGRIND" ./case-nval --testMarkupFileName stderr <$i
  11. for t in 1 2; do
  12. bash ../scripts/test-ref r-case-nval-$j-$t "$VALGRIND" ./case-nval --testMarkupFileName stderr --testCase "${t}" <$i
  13. done
  14. bash ../scripts/test-ref r-case-nval-$j-3 "$VALGRIND" ./case-nval --testCase "3" <$i
  15. bash ../scripts/test-ref r-case-nval-$j-3-stderr "$VALGRIND" ./case-nval --testCase "3" --testCaseFileName stderr <$i
  16. bash ../scripts/test-ref r-case-nval-$j-4 "$VALGRIND" ./case-nval --testCase "4" --testCaseFileName stderr <$i
  17. done
  18. rm -f case-nval case-nval.exe
  19. bash ../scripts/compile src/case-string-zb.cpp
  20. for i in files/"$os"/case-string-zb/*; do
  21. j=$(basename $i)
  22. bash ../scripts/test-ref r-case-string-zb-$j "$VALGRIND" ./case-string-zb --testMarkupFileName stderr <$i
  23. for t in 1 2; do
  24. bash ../scripts/test-ref r-case-string-zb-$j-$t "$VALGRIND" ./case-string-zb --testMarkupFileName stderr --testCase "${t}" <$i
  25. done
  26. bash ../scripts/test-ref r-case-string-zb-$j-3 "$VALGRIND" ./case-string-zb --testCase "3" <$i
  27. bash ../scripts/test-ref r-case-string-zb-$j-3-stderr "$VALGRIND" ./case-string-zb --testCase "3" --testCaseFileName stderr <$i
  28. bash ../scripts/test-ref r-case-string-zb-$j-4 "$VALGRIND" ./case-string-zb --testCase "4" --testCaseFileName stderr <$i
  29. done
  30. rm -f case-string-zb case-string-zb.exe
  31. bash ../scripts/compile src/sval.cpp
  32. for i in files/"$os"/sval/*; do
  33. j=$(basename $i)
  34. echo "test-ref r-sval-$j ""$VALGRIND"" ./sval < files/$os/sval/input.$i"
  35. bash ../scripts/test-ref r-sval-$j "$VALGRIND" ./sval <$i
  36. done
  37. rm -f sval sval.exe