GNU bug report logs -
#20700
[PATCH] test: tighten tests for bracket exprs
Previous Next
Reported by: Paul Eggert <eggert <at> cs.ucla.edu>
Date: Sat, 30 May 2015 19:27:02 UTC
Severity: normal
Tags: patch
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* tests/posix-bracket: Test '[a-a[.-.]--]'.
Also, test that failures are with status 1
(nonmatching data), not status 2 (invalid expressions).
---
tests/posix-bracket | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/posix-bracket b/tests/posix-bracket
index 4d54112..840e53e 100755
--- a/tests/posix-bracket
+++ b/tests/posix-bracket
@@ -24,10 +24,11 @@ fail=0
echo a >in || framework_failure_
for bracketed in '[.a.]' '[.a.]-a' 'a-[.a.]' '[.a.]-[.a.]' \
- '[=a=]' '[:alpha:]'; do
+ '[=a=]' '[:alpha:]' 'a-a[.-.]--'; do
grep "[$bracketed]" in >out || fail=1
compare in out || fail=1
- grep "[^$bracketed]" in >out && fail=1
+ grep "[^$bracketed]" in >out
+ test $? -eq 1 || fail=1
compare /dev/null out || fail=1
done
Exit $fail
--
2.1.0
This bug report was last modified 9 years and 363 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.