grep-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grep branch, master, updated. v3.4-almost-24-g2c79623


From: Jim Meyering
Subject: grep branch, master, updated. v3.4-almost-24-g2c79623
Date: Thu, 17 Sep 2020 19:02:27 -0400 (EDT)

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  2c79623eb519aae04d42f938408280e5c59f23f8 (commit)
       via  4b3f435b62107d35167f055bb4bad120159703d7 (commit)
      from  271793f09cc604ad54ad89b18110716555cc748b (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=2c79623eb519aae04d42f938408280e5c59f23f8


commit 2c79623eb519aae04d42f938408280e5c59f23f8
Author: Jim Meyering <meyering@fb.com>
Date:   Thu Sep 17 13:16:42 2020 -0700

    tests: add coverage for code that emits the new diagnostic
    
    * tests/binary-file-matches: New file.
    * tests/Makefile.am (TESTS): Add it.

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 24f2c21..3ee2915 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -70,6 +70,7 @@ TESTS =                                               \
   backslash-s-vs-invalid-multibyte             \
   big-hole                                     \
   big-match                                    \
+  binary-file-matches                          \
   bogus-wctob                                  \
   bre                                          \
   c-locale                                     \
diff --git a/tests/binary-file-matches b/tests/binary-file-matches
new file mode 100644
index 0000000..75c23bc
--- /dev/null
+++ b/tests/binary-file-matches
@@ -0,0 +1,21 @@
+#! /bin/sh
+# Test for the "binary file ... matches" diagnostic.
+#
+# Copyright (C) 2020 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+
+fail=0
+
+echo "grep: binary file '(standard input)' matches" > exp \
+  || framework_failure_
+
+printf 'a\0' | grep a > out 2> err || fail=1
+compare /dev/null out || fail=1
+compare exp err || fail=1
+
+Exit $fail

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


commit 2c79623eb519aae04d42f938408280e5c59f23f8
Author: Jim Meyering <meyering@fb.com>
Date:   Thu Sep 17 13:16:42 2020 -0700

    tests: add coverage for code that emits the new diagnostic
    
    * tests/binary-file-matches: New file.
    * tests/Makefile.am (TESTS): Add it.

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 24f2c21..3ee2915 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -70,6 +70,7 @@ TESTS =                                               \
   backslash-s-vs-invalid-multibyte             \
   big-hole                                     \
   big-match                                    \
+  binary-file-matches                          \
   bogus-wctob                                  \
   bre                                          \
   c-locale                                     \
diff --git a/tests/binary-file-matches b/tests/binary-file-matches
new file mode 100644
index 0000000..75c23bc
--- /dev/null
+++ b/tests/binary-file-matches
@@ -0,0 +1,21 @@
+#! /bin/sh
+# Test for the "binary file ... matches" diagnostic.
+#
+# Copyright (C) 2020 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+
+fail=0
+
+echo "grep: binary file '(standard input)' matches" > exp \
+  || framework_failure_
+
+printf 'a\0' | grep a > out 2> err || fail=1
+compare /dev/null out || fail=1
+compare exp err || fail=1
+
+Exit $fail

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

Summary of changes:
 src/grep.c                                |  2 +-
 tests/Makefile.am                         |  1 +
 tests/{pcre-abort => binary-file-matches} | 13 +++++++------
 3 files changed, 9 insertions(+), 7 deletions(-)
 copy tests/{pcre-abort => binary-file-matches} (51%)
 mode change 100755 => 100644


hooks/post-receive
-- 
grep



reply via email to

[Prev in Thread] Current Thread [Next in Thread]