Merge branch 'jk/grep-binary-workaround-in-test'
authorJunio C Hamano <gitster@pobox.com>
Fri, 26 Feb 2016 21:37:23 +0000 (13:37 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 26 Feb 2016 21:37:23 +0000 (13:37 -0800)
Recent versions of GNU grep are pickier when their input contains
arbitrary binary data, which some of our tests uses. Rewrite the
tests to sidestep the problem.

* jk/grep-binary-workaround-in-test:
t9200: avoid grep on non-ASCII data
t8005: avoid grep on non-ASCII data

1  2 
t/t9200-git-cvsexportcommit.sh
index 5cfb9cfc52e715c916f3ebe922e57263d7c4d7da,7117719830e0493cca1415cd3020dff213f73728..bb879a527d94e7329dccef15525421917676f56b
@@@ -35,7 -35,7 +35,7 @@@ exit 
  
  check_entries () {
        # $1 == directory, $2 == expected
-       grep '^/' "$1/CVS/Entries" | sort | cut -d/ -f2,3,5 >actual
+       sed -ne '/^\//p' "$1/CVS/Entries" | sort | cut -d/ -f2,3,5 >actual
        if test -z "$2"
        then
                >expected
@@@ -197,7 -197,7 +197,7 @@@ if p="Å/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/
  then
  
  # This test contains UTF-8 characters
 -test_expect_success \
 +test_expect_success !MINGW \
       'File with non-ascii file name' \
       'mkdir -p Å/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/å/ä/ö &&
        echo Foo >Å/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/å/ä/ö/gårdetsågårdet.txt &&