3 .
"$srcdir/init.sh"; path_prepend_ .
5 # Test NULL prefix. Result should not contain a number, except in lines that
6 # start with 'EDC' (IBM z/OS libc produces an error identifier before the
8 ${CHECKER} test-perror
2>&1 >/dev
/null | LC_ALL
=C
tr -d '\r' > t-perror.tmp
9 grep -v '^EDC' t-perror.tmp |
grep '[0-9]' > /dev
/null \
10 && fail_
"result should not contain a number"
12 # Test empty prefix. Result should be the same.
13 ${CHECKER} test-perror
'' 2>&1 >/dev
/null | LC_ALL
=C
tr -d '\r' > t-perror1.tmp
14 diff t-perror.tmp t-perror1.tmp \
15 || fail_
"empty prefix should behave like NULL argument"
17 # Test non-empty prefix.
18 ${CHECKER} test-perror foo
2>&1 >/dev
/null | LC_ALL
=C
tr -d '\r' > t-perror3.tmp
19 sed -e 's/^/foo: /' < t-perror.tmp
> t-perror2.tmp
20 diff t-perror2.tmp t-perror3.tmp || fail_
"prefix applied incorrectly"
23 ${CHECKER} test-perror
>out
2>/dev
/null || fail_
"unexpected exit status"
24 test -s out
&& fail_
"unexpected output"