123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- #! /bin/sh
- . test-init.sh
- . tap-setup.sh
- cat > all.test <<'END'
- 1..5
- ok 1: foo1
- not ok 2- foo2
- ok 3@ foo3
- not ok 4?&%$ foo4
- ok 5"`!! foo5 # TODO
- END
- run_make -O -e FAIL check
- count_test_results total=5 pass=1 fail=1 skip=1 xpass=1 xfail=1 error=0
- $EGREP '^PASS: all\.test 1 ?: foo1$' stdout
- $EGREP '^FAIL: all\.test 2 ?- foo2$' stdout
- $EGREP '^SKIP: all\.test 3 ?@ foo3 # SKIP$' stdout
- $EGREP '^XFAIL: all\.test 4 ?\?&%\$ foo4 # TODO$' stdout
- $EGREP '^XPASS: all\.test 5 ?"`!! foo5
- cat > all.test <<'END'
- 1..3
- ok 2: quux
- not ok 1!
- ok 476$
- END
- run_make -O -e FAIL check
- count_test_results total=3 pass=0 fail=0 skip=0 xpass=0 xfail=0 error=3
- $EGREP '^ERROR: all\.test 2 ?: quux # OUT-OF-ORDER \(expecting 1\)$' stdout
- $EGREP '^ERROR: all\.test 1 ?! # OUT-OF-ORDER \(expecting 2\)$' stdout
- $EGREP '^ERROR: all\.test 476 ?\$ # OUT-OF-ORDER \(expecting 3\)$' stdout
- cat > punctuation <<'END'
- '
- "
- `
- #
- $
- !
- \
- /
- &
- %
- (
- )
- |
- ^
- ~
- ?
- *
- +
- -
- ,
- :
- ;
- =
- <
- >
- @
- [
- ]
- {
- }
- \
- END
- # Strip any extra whitespace, for Solaris' wc.
- planned=$(wc -l <punctuation | tr -d " $tab")
- echo 1..$planned > all.test
- awk '{print "ok " NR $0 }' punctuation >> all.test
- cat all.test
- grep "^ok 1'$" all.test || framework_failure_ "creating all.test"
- run_make -O check
- count_test_results total=$planned pass=$planned \
- fail=0 skip=0 xpass=0 xfail=0 error=0
- :
|