This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  2f56378c77591707d5c5d922f2ffb7442c894af8 (commit)
       via  c269bec26e884cfe2d47293cd5fdfc6dc8f70923 (commit)
      from  3ddf995f9c9651d8ca8a6d23655e956cb807fb36 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=2f56378c77591707d5c5d922f2ffb7442c894af8


commit 2f56378c77591707d5c5d922f2ffb7442c894af8
Author: Paul Eggert <[email protected]>
Date:   Fri Jun 3 21:57:52 2016 -0700

    tests: fix similar bug in exit status test
    
    * tests/grep-dir (status_range): New shell function.
    Use it to fix bug where $? was not saved properly.

diff --git a/tests/grep-dir b/tests/grep-dir
index de14d62..7f8d6ca 100755
--- a/tests/grep-dir
+++ b/tests/grep-dir
@@ -12,14 +12,20 @@ else
   l=2 u=127 L=2 U=127
 fi
 
-echo x | grep -f a/; { test $? -ge $L && test $? -le $U; } || fail=1
-echo x | grep -if a/; { test $? -ge $L && test $? -le $U; } || fail=1
-echo x | grep -Ff a/; { test $? -ge $L && test $? -le $U; } || fail=1
-echo x | grep -Fif a/; { test $? -ge $L && test $? -le $U; } || fail=1
+status_range ()
+{
+  status=$?
+  { test $1 -le $status && test $status -le $2; } || fail=1
+}
 
-grep -f a/ < /dev/null; { test $? -ge $l && test $? -le $u; } || fail=1
-grep -if a/ < /dev/null; { test $? -ge $l && test $? -le $u; } || fail=1
-grep -Ff a/ < /dev/null; { test $? -ge $l && test $? -le $u; } || fail=1
-grep -Fif a/ < /dev/null; { test $? -ge $l && test $? -le $u; } || fail=1
+echo x | grep -f a/; status_range $L $U
+echo x | grep -if a/; status_range $L $U
+echo x | grep -Ff a/; status_range $L $U
+echo x | grep -Fif a/; status_range $L $U
+
+grep -f a/ < /dev/null; status_range $l $u
+grep -if a/ < /dev/null; status_range $l $u
+grep -Ff a/ < /dev/null; status_range $l $u
+grep -Fif a/ < /dev/null; status_range $l $u
 
 Exit $fail

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=c269bec26e884cfe2d47293cd5fdfc6dc8f70923


commit 2f56378c77591707d5c5d922f2ffb7442c894af8
Author: Paul Eggert <[email protected]>
Date:   Fri Jun 3 21:57:52 2016 -0700

    tests: fix similar bug in exit status test
    
    * tests/grep-dir (status_range): New shell function.
    Use it to fix bug where $? was not saved properly.

diff --git a/tests/grep-dir b/tests/grep-dir
index de14d62..7f8d6ca 100755
--- a/tests/grep-dir
+++ b/tests/grep-dir
@@ -12,14 +12,20 @@ else
   l=2 u=127 L=2 U=127
 fi
 
-echo x | grep -f a/; { test $? -ge $L && test $? -le $U; } || fail=1
-echo x | grep -if a/; { test $? -ge $L && test $? -le $U; } || fail=1
-echo x | grep -Ff a/; { test $? -ge $L && test $? -le $U; } || fail=1
-echo x | grep -Fif a/; { test $? -ge $L && test $? -le $U; } || fail=1
+status_range ()
+{
+  status=$?
+  { test $1 -le $status && test $status -le $2; } || fail=1
+}
 
-grep -f a/ < /dev/null; { test $? -ge $l && test $? -le $u; } || fail=1
-grep -if a/ < /dev/null; { test $? -ge $l && test $? -le $u; } || fail=1
-grep -Ff a/ < /dev/null; { test $? -ge $l && test $? -le $u; } || fail=1
-grep -Fif a/ < /dev/null; { test $? -ge $l && test $? -le $u; } || fail=1
+echo x | grep -f a/; status_range $L $U
+echo x | grep -if a/; status_range $L $U
+echo x | grep -Ff a/; status_range $L $U
+echo x | grep -Fif a/; status_range $L $U
+
+grep -f a/ < /dev/null; status_range $l $u
+grep -if a/ < /dev/null; status_range $l $u
+grep -Ff a/ < /dev/null; status_range $l $u
+grep -Fif a/ < /dev/null; status_range $l $u
 
 Exit $fail

-----------------------------------------------------------------------

Summary of changes:
 tests/grep-dir |   22 ++++++++++++++--------
 tests/status   |    3 ++-
 2 files changed, 16 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
grep

Reply via email to