tap-msg0-misc.sh 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. # - literal "0" and "0.0" in a test description and a TODO/SKIP message
  18. # at the same time
  19. . test-init.sh
  20. . tap-setup.sh
  21. cat > all.test << 'END'
  22. 1..14
  23. ok 1 0
  24. ok 2 0.0
  25. ok 3 0 # TODO 0
  26. ok 4 0.0 # TODO 0
  27. ok 5 0 # TODO 0.0
  28. ok 6 0.0 # TODO 0.0
  29. not ok 7 0 # TODO 0
  30. not ok 8 0.0 # TODO 0
  31. not ok 9 0 # TODO 0.0
  32. not ok 10 0.0 # TODO 0.0
  33. ok 11 0 # SKIP 0
  34. ok 12 0.0 # SKIP 0
  35. ok 13 0 # SKIP 0.0
  36. ok 14 0.0 # SKIP 0.0
  37. END
  38. run_make -O -e FAIL check
  39. count_test_results total=14 pass=2 fail=0 xpass=4 xfail=4 skip=4 error=0
  40. sed '/^ *$/d' > exp << 'END'
  41. PASS: all.test 1 0
  42. PASS: all.test 2 0.0
  43. XPASS: all.test 3 0 # TODO 0
  44. XPASS: all.test 4 0.0 # TODO 0
  45. XPASS: all.test 5 0 # TODO 0.0
  46. XPASS: all.test 6 0.0 # TODO 0.0
  47. XFAIL: all.test 7 0 # TODO 0
  48. XFAIL: all.test 8 0.0 # TODO 0
  49. XFAIL: all.test 9 0 # TODO 0.0
  50. XFAIL: all.test 10 0.0 # TODO 0.0
  51. SKIP: all.test 11 0 # SKIP 0
  52. SKIP: all.test 12 0.0 # SKIP 0
  53. SKIP: all.test 13 0 # SKIP 0.0
  54. SKIP: all.test 14 0.0 # SKIP 0.0
  55. END
  56. $FGREP ': all.test' stdout > got
  57. cat exp
  58. cat got
  59. diff exp got
  60. :