GNU bug report logs - #20700
[PATCH] test: tighten tests for bracket exprs

Previous Next

Package: grep;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20700 in the body.
You can then email your comments to 20700 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-grep <at> gnu.org:
bug#20700; Package grep. (Sat, 30 May 2015 19:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Eggert <eggert <at> cs.ucla.edu>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Sat, 30 May 2015 19:27:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: bug-grep <at> gnu.org
Cc: Paul Eggert <eggert <at> cs.ucla.edu>
Subject: [PATCH] test: tighten tests for bracket exprs
Date: Sat, 30 May 2015 12:26:22 -0700
* 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





bug closed, send any further explanations to 20700 <at> debbugs.gnu.org and Paul Eggert <eggert <at> cs.ucla.edu> Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Sat, 30 May 2015 19:44:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 28 Jun 2015 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 362 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.