pipping@quicksand ~ $ echo F | grep F F pipping@quicksand ~ $ echo F | grep -i F pipping@quicksand ~ $
The problem only manifests with capital letters pipping@quicksand ~ $ echo nsobject | grep -i NSObject nsobject pipping@quicksand ~ $ echo NSobject | grep -i NSObject pipping@quicksand ~ $
I think we need to care more about tests in prefix. The test suite tells us that it's broken. Testing: ../src/grep Word -o -i input: "WordA/wordB/WORDC/" output: "" expect: "Word/word/WORD/" FAIL Testing: ../src/grep WORD -o -i input: "WordA/wordB/WORDC/" output: "" expect: "Word/word/WORD/" FAIL Testing: ../src/grep w. -o -b input: "XwA YwB/ZwC/" output: "4:wA/8:wB/12:wC/" expect: "1:wA/5:wB/9:wC/" FAIL Testing: ../src/grep w. -o -b -i input: "XwA YwB/ZwC/" output: "4:wA/8:wB/12:wC/" expect: "1:wA/5:wB/9:wC/" FAIL Testing: ../src/grep w. -o -b -3 input: "XwA YwB/ZwC/" output: "4:wA/8:wB/12:wC/" expect: "1:wA/5:wB/9:wC/" FAIL Testing: ../src/grep w -F -o -b input: "XwA YwB/ZwC/" output: "4:w/8:w/12:w/" expect: "1:w/5:w/9:w/" FAIL Testing: ../src/grep w -F -o -b -i input: "XwA YwB/ZwC/" output: "4:w/8:w/12:w/" expect: "1:w/5:w/9:w/" FAIL Testing: ../src/grep w -F -o -b -3 input: "XwA YwB/ZwC/" output: "4:w/8:w/12:w/" expect: "1:w/5:w/9:w/" FAIL Testing: ../src/grep ^word_* -o input: "word_word/" output: "" expect: "word_/" FAIL Testing: ../src/grep Word --color=always -i input: "WordA/wordb/WORDC/" output: "-n WordA/wordb/WORDC/" expect: "[01;31m[KWord[m[KA/[01;31m[Kword[m[Kb/[01;31m[KWORD[m[KC/" FAIL Testing: ../src/grep word --color=always -i input: "WordA/wordb/WORDC/" output: "-n [01;31m[KWord[m[KA/[01;31m[Kword[m[Kb/[01;31m[KWORD[m[KC/" expect: "[01;31m[KWord[m[KA/[01;31m[Kword[m[Kb/[01;31m[KWORD[m[KC/" FAIL Testing: ../src/grep WORD --color=always -i input: "WordA/wordb/WORDC/" output: "-n WordA/wordb/WORDC/" expect: "[01;31m[KWord[m[KA/[01;31m[Kword[m[Kb/[01;31m[KWORD[m[KC/" FAIL Testing: ../src/grep ^word_* --color=always input: "word_word/" output: "" expect: "[01;31m[Kword_[m[Kword/" FAIL Testing: ../src/grep \<word --color=always input: "wordword/" output: "-n [01;31m[Kword[m[Kword/" expect: "[01;31m[Kword[m[Kword/" FAIL Testing: ../src/grep ^4$ -m1 -A99 input: "4/40/" output: "" expect: "4/40/" FAIL Testing: ../src/grep ^4$ -m1 -A99 input: "4/04/" output: "" expect: "4/04/" FAIL Testing: ../src/grep ^4$ -m1 -A99 input: "4/444/" output: "" expect: "4/444/" FAIL Testing: ../src/grep ^4 -m1 -A99 input: "4/40/" output: "40//" expect: "4/" FAIL Testing: ../src/grep ^4 -m1 -A99 input: "4/04/" output: "" expect: "4/04/" FAIL Testing: ../src/grep ^4 -m1 -A99 input: "4/444/" output: "444//" expect: "4/" FAIL Testing: ../src/grep 4$ -m1 -A99 input: "4/40/" output: "-n 4/40//" expect: "4/40/" FAIL Testing: ../src/grep 4$ -m1 -A99 input: "4/04/" output: "-n 4/" expect: "4/" FAIL Testing: ../src/grep 4$ -m1 -A99 input: "4/444/" output: "-n 4/" expect: "4/" FAIL Testing: ../src/grep -wF -e A -e B -e C input: "A/CX/B/C/" output: "-n A/B/C/" expect: "A/B/C/" FAIL Testing: ../src/grep --color=always y* input: "xyz/" output: "-n x[01;31m[Ky[m[Kz//" expect: "x[01;31m[Ky[m[Kz/" FAIL Testing: ../src/grep -E --color=always -e bb -e cc -e ccc input: "a bb ccc dddd/" output: "-n a [01;31m[Kbb[m[K [01;31m[Kccc[m[K dddd/" expect: "a [01;31m[Kbb[m[K [01;31m[Kccc[m[K dddd/" FAIL Testing: ../src/grep -F --color=always -e bb -e cc -e ccc input: "a bb ccc dddd/" output: "-n a [01;31m[Kbb[m[K [01;31m[Kccc[m[K dddd/" expect: "a [01;31m[Kbb[m[K [01;31m[Kccc[m[K dddd/" FAIL Testing: ../src/grep -E --color=always -e bb -e ccc -e cc input: "a bb ccc dddd/" output: "-n a [01;31m[Kbb[m[K [01;31m[Kccc[m[K dddd/" expect: "a [01;31m[Kbb[m[K [01;31m[Kccc[m[K dddd/" FAIL Testing: ../src/grep -F --color=always -e bb -e ccc -e cc input: "a bb ccc dddd/" output: "-n a [01;31m[Kbb[m[K [01;31m[Kccc[m[K dddd/" expect: "a [01;31m[Kbb[m[K [01;31m[Kccc[m[K dddd/" FAIL Testing: ../src/grep -E -w --color=always -e bb -e ccc input: "a bb ccc dddd/" output: "-n a [01;31m[Kbb[m[K [01;31m[Kccc[m[K dddd/" expect: "a [01;31m[Kbb[m[K [01;31m[Kccc[m[K dddd/" FAIL Testing: ../src/grep -F -w --color=always -e bb -e ccc input: "a bb ccc dddd/" output: "-n a [01;31m[Kbb[m[K [01;31m[Kccc[m[K dddd/" expect: "a [01;31m[Kbb[m[K [01;31m[Kccc[m[K dddd/" FAIL Testing: ../src/grep -E -w --color=always -e ccc -e bb input: "a bb ccc dddd/" output: "-n a [01;31m[Kbb[m[K [01;31m[Kccc[m[K dddd/" expect: "a [01;31m[Kbb[m[K [01;31m[Kccc[m[K dddd/" FAIL Testing: ../src/grep -F -w --color=always -e ccc -e bb input: "a bb ccc dddd/" output: "-n a [01;31m[Kbb[m[K [01;31m[Kccc[m[K dddd/" expect: "a [01;31m[Kbb[m[K [01;31m[Kccc[m[K dddd/" FAIL Testing: ../src/grep -E -w --color=always -e bb -e ccc input: "dddd ccc bb a/" output: "-n dddd [01;31m[Kccc[m[K [01;31m[Kbb[m[K a/" expect: "dddd [01;31m[Kccc[m[K [01;31m[Kbb[m[K a/" FAIL Testing: ../src/grep -F -w --color=always -e bb -e ccc input: "dddd ccc bb a/" output: "-n dddd [01;31m[Kccc[m[K [01;31m[Kbb[m[K a/" expect: "dddd [01;31m[Kccc[m[K [01;31m[Kbb[m[K a/" FAIL Testing: ../src/grep -E -w --color=always -e ccc -e bb input: "dddd ccc bb a/" output: "-n dddd [01;31m[Kccc[m[K [01;31m[Kbb[m[K a/" expect: "dddd [01;31m[Kccc[m[K [01;31m[Kbb[m[K a/" FAIL Testing: ../src/grep -F -w --color=always -e ccc -e bb input: "dddd ccc bb a/" output: "-n dddd [01;31m[Kccc[m[K [01;31m[Kbb[m[K a/" expect: "dddd [01;31m[Kccc[m[K [01;31m[Kbb[m[K a/" FAIL Testing: ../src/grep -E -w --color=always bc input: "bcd abcd abc bc bcd abc/" output: "-n bcd abcd abc [01;31m[Kbc[m[K bcd abc/" expect: "bcd abcd abc [01;31m[Kbc[m[K bcd abc/" FAIL Testing: ../src/grep -F -w --color=always bc input: "bcd abcd abc bc bcd abc/" output: "-n bcd abcd abc [01;31m[Kbc[m[K bcd abc/" expect: "bcd abcd abc [01;31m[Kbc[m[K bcd abc/" FAIL Testing: ../src/grep -E -w --color=always bc input: "bc abcd bc/" output: "-n [01;31m[Kbc[m[K abcd [01;31m[Kbc[m[K/" expect: "[01;31m[Kbc[m[K abcd [01;31m[Kbc[m[K/" FAIL Testing: ../src/grep -F -w --color=always bc input: "bc abcd bc/" output: "-n [01;31m[Kbc[m[K abcd [01;31m[Kbc[m[K/" expect: "[01;31m[Kbc[m[K abcd [01;31m[Kbc[m[K/" FAIL FAIL: foad1.sh
the bug still exists in their CVS
FYI: OSX only problem. Automated testsuite (expect other locales, i probably don't have that setup right) and manual testing pass on Linux.
http://lists.gnu.org/archive/html/bug-grep/2008-12/msg00011.html
do you suggest we mask? (I found it annoyingly locks up Terminal.app as well with its colours)
well iirc 2.5.1 and 2.5.1 were at least as broken so there's nothing we can do about it.
Created attachment 176053 [details, diff] "fix"
applied, thanks