grep-commit
[Top][All Lists]
Advanced

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

grep branch, master, updated. v2.18-140-g6f07900


From: Paul Eggert
Subject: grep branch, master, updated. v2.18-140-g6f07900
Date: Sat, 10 May 2014 08:25:47 +0000

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  6f079006b832ae2be56c915f8ca9b5ea5ede6bf9 (commit)
      from  51221951e4878b57e098db231014ce29ecfc7100 (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=6f079006b832ae2be56c915f8ca9b5ea5ede6bf9


commit 6f079006b832ae2be56c915f8ca9b5ea5ede6bf9
Author: Paul Eggert <address@hidden>
Date:   Sat May 10 01:25:08 2014 -0700

    tests: add test case for -C 0 change
    
    * tests/context-0: New test.
    * tests/Makefile.am (TESTS): Add it.

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 91775bd..f3450f3 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -50,6 +50,7 @@ TESTS =                                               \
   case-fold-titlecase                          \
   char-class-multibyte                         \
   char-class-multibyte2                                \
+  context-0                                    \
   dfa-coverage                                 \
   dfa-heap-overrun                             \
   dfaexec-multibyte                            \
diff --git a/tests/context-0 b/tests/context-0
new file mode 100755
index 0000000..4b63305
--- /dev/null
+++ b/tests/context-0
@@ -0,0 +1,27 @@
+#!/bin/sh
+# 0 lines of context
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+
+cat <<EOF > in || framework_failure_
+needle
+1st line of context
+2nd line of context
+3rd line of context
+another needle
+5th line of context relative to first match
+6th line...
+EOF
+
+cat <<EOF > exp || framework_failure_
+needle
+--
+another needle
+EOF
+
+fail=0
+grep -C 0 needle in > out 2>err || fail=1
+
+compare exp out || fail=1
+compare /dev/null err || fail=1
+
+Exit $fail

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

Summary of changes:
 tests/Makefile.am                         |    1 +
 tests/{max-count-vs-context => context-0} |   10 +++++++---
 2 files changed, 8 insertions(+), 3 deletions(-)
 copy tests/{max-count-vs-context => context-0} (66%)


hooks/post-receive
-- 
grep



reply via email to

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