Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 251427 - sys-apps/grep-2.5.3-r1: -i is broken on OSX
Summary: sys-apps/grep-2.5.3-r1: -i is broken on OSX
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Mac OSX (show other bugs)
Hardware: All OS X
: Low major (vote)
Assignee: Gentoo Prefix
URL: http://lists.gnu.org/archive/html/bug...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-18 09:51 UTC by Elias Pipping
Modified: 2008-12-21 16:52 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
"fix" (grep-2.5.3.patch,558 bytes, patch)
2008-12-21 15:49 UTC, Elias Pipping
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Elias Pipping 2008-12-18 09:51:42 UTC
pipping@quicksand ~ $ echo F | grep F
F
pipping@quicksand ~ $ echo F | grep -i F
pipping@quicksand ~ $
Comment 1 Elias Pipping 2008-12-18 09:52:38 UTC
The problem only manifests with capital letters

pipping@quicksand ~ $ echo nsobject | grep -i NSObject
nsobject
pipping@quicksand ~ $ echo NSobject | grep -i NSObject
pipping@quicksand ~ $ 
Comment 2 Elias Pipping 2008-12-18 10:00:55 UTC
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
Comment 3 Elias Pipping 2008-12-18 10:05:48 UTC
the bug still exists in their CVS
Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-12-18 16:39:18 UTC
FYI:
OSX only problem. Automated testsuite (expect other locales, i probably don't have that setup right) and manual testing pass on Linux.
Comment 6 Fabian Groffen gentoo-dev 2008-12-18 20:45:13 UTC
do you suggest we mask?  (I found it annoyingly locks up Terminal.app as well with its colours)
Comment 7 Elias Pipping 2008-12-18 20:48:50 UTC
well iirc 2.5.1 and 2.5.1 were at least as broken so there's nothing we can do about it.
Comment 8 Elias Pipping 2008-12-21 15:49:18 UTC
Created attachment 176053 [details, diff]
"fix"
Comment 9 Fabian Groffen gentoo-dev 2008-12-21 16:52:40 UTC
applied, thanks