[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch #7132] Small change to grep-2.6
From: |
Jim Meyering |
Subject: |
Re: [patch #7132] Small change to grep-2.6 |
Date: |
Thu, 25 Mar 2010 10:17:21 +0100 |
Norihiro Tanaka wrote:
> This problem is easily reproduced with both -w option and backref.
Hi Norihiro,
Thank you for the example.
To illustrate the problem on the command line, I did this:
$ printf '%s\n' baa aax aa 'aa rest' zz | src/grep -Ew '(a)\1'; echo
aaaa
Note how it prints only the matching text, but neither
the newline of line 3 nor the " rest\n" of line 4.
Does one of your patches fix that problem?
None of Paolo's 3-patch series appears to do so.
> #!/bin/sh
> # This would fail for grep-2.6
> : ${srcdir=.}
> . "$srcdir/init.sh"; path_prepend_ ../src
>
> printf 'foo foo bar\n' > exp1 || framework_failure
> fail=0
BTW, while the framework_failure function is used to handle unlikely
failures in several other test scripts, I've just noticed
that it is not defined. I will fix that shortly.
> for LOC in en_US.UTF-8 zh_CN $LOCALE_FR_UTF8; do
> out=out1-$LOC
> LC_ALL=$LOC grep -w '\(foo\) \1' exp1 > $out || fail=1
> compare $out exp1 || fail=1
> done
>
> Exit $fail
> --