run_mru_tests.sh 501 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. # Script to run the unit-tests for the MRU Vim plugin
  3. VIMPRG=${VIMPRG:=/usr/bin/vim}
  4. VIM_CMD="$VIMPRG -N -u NONE -U NONE -i NONE --not-a-term"
  5. $VIM_CMD -S unit_tests.vim
  6. echo "MRU unit test results"
  7. echo
  8. if [ ! -f results.txt ]
  9. then
  10. echo "ERROR: Test results file 'results.txt' is not found"
  11. exit 1
  12. fi
  13. cat results.txt
  14. echo
  15. grep FAIL results.txt > /dev/null 2>&1
  16. if [ $? -eq 0 ]
  17. then
  18. echo "ERROR: Some test(s) failed."
  19. exit 1
  20. fi
  21. echo "SUCCESS: All the tests passed."
  22. exit 0