tap-msg0-result.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #! /bin/sh
  2. # Copyright (C) 2011-2017 Free Software Foundation, Inc.
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. # TAP support:
  17. # - the string "0" as a test description
  18. . test-init.sh
  19. . tap-setup.sh
  20. cat > all.test << 'END'
  21. 1..10
  22. ok 1 0
  23. ok - 0
  24. not ok 3 0
  25. not ok - 0
  26. ok 5 0 # TODO
  27. ok - 0 # TODO
  28. not ok 7 0 # TODO
  29. not ok - 0 # TODO
  30. ok 9 0 # SKIP
  31. ok - 0 # SKIP
  32. END
  33. run_make -O -e FAIL check
  34. count_test_results total=10 pass=2 fail=2 xpass=2 xfail=2 skip=2 error=0
  35. cat > exp << 'END'
  36. PASS: all.test 1 0
  37. PASS: all.test 2 - 0
  38. FAIL: all.test 3 0
  39. FAIL: all.test 4 - 0
  40. XPASS: all.test 5 0 # TODO
  41. XPASS: all.test 6 - 0 # TODO
  42. XFAIL: all.test 7 0 # TODO
  43. XFAIL: all.test 8 - 0 # TODO
  44. SKIP: all.test 9 0 # SKIP
  45. SKIP: all.test 10 - 0 # SKIP
  46. END
  47. $FGREP ': all.test' stdout > got
  48. cat exp
  49. cat got
  50. diff exp got
  51. :