From 34ce3e24a1d922b8778ec0b764540e5bc43155b4 Mon Sep 17 00:00:00 2001 From: Antti-Juhani Kaijanaho Date: Wed, 14 Dec 2011 20:36:48 +0200 Subject: Bug #652034: Handle multiple instances of the same field gracefully. For grep-dctrl, this means having -F search for all of the same-name fields disjunctively. The -s option selects all same-name fields for printing. For the other tools, all but the first are ignored. No string changes, so committing to maint-2.20 for release with 2.20.1. Signed-off-by: Antti-Juhani Kaijanaho --- tests/bug652034.in | 3 +++ tests/bug652034.out | 10 ++++++++++ tests/bug652034.sh | 9 +++++++++ 3 files changed, 22 insertions(+) create mode 100644 tests/bug652034.in create mode 100644 tests/bug652034.out create mode 100644 tests/bug652034.sh (limited to 'tests') diff --git a/tests/bug652034.in b/tests/bug652034.in new file mode 100644 index 0000000..287f616 --- /dev/null +++ b/tests/bug652034.in @@ -0,0 +1,3 @@ +Foo: a +Foo: b + diff --git a/tests/bug652034.out b/tests/bug652034.out new file mode 100644 index 0000000..845b68c --- /dev/null +++ b/tests/bug652034.out @@ -0,0 +1,10 @@ +Foo: a +Foo: b + +### +Foo: a +Foo: b + +### +Foo: a +Foo: b diff --git a/tests/bug652034.sh b/tests/bug652034.sh new file mode 100644 index 0000000..af5e018 --- /dev/null +++ b/tests/bug652034.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +${GREP_DCTRL:-grep-dctrl} -FFoo a bug652034.in +echo '###' +${GREP_DCTRL:-grep-dctrl} -FFoo b bug652034.in +echo '###' +${GREP_DCTRL:-grep-dctrl} -sFoo -FFoo b bug652034.in -- cgit v1.2.3