Last change
on this file was 3529, checked in by bird, 3 years ago |
Imported grep 3.7 from grep-3.7.tar.gz (sha256: c22b0cf2d4f6bbe599c902387e8058990e1eee99aef333a203829e5fd3dbb342), applying minimal auto-props.
|
-
Property svn:executable
set to
*
|
File size:
1007 bytes
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 | : ${srcdir=.}
|
---|
3 | . "$srcdir/init.sh"; path_prepend_ .
|
---|
4 |
|
---|
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
|
---|
7 | # error message).
|
---|
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"
|
---|
11 |
|
---|
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"
|
---|
16 |
|
---|
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"
|
---|
21 |
|
---|
22 | # Test exit status.
|
---|
23 | ${CHECKER} test-perror >out 2>/dev/null || fail_ "unexpected exit status"
|
---|
24 | test -s out && fail_ "unexpected output"
|
---|
25 |
|
---|
26 | Exit 0
|
---|
Note:
See
TracBrowser
for help on using the repository browser.