Merge branch 'rj/maint-grep-remove-redundant-test' into maint
authorJunio C Hamano <gitster@pobox.com>
Wed, 15 Aug 2012 20:37:20 +0000 (13:37 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Aug 2012 20:37:20 +0000 (13:37 -0700)
* rj/maint-grep-remove-redundant-test:
t7810-*.sh: Remove redundant test

1  2 
t/t7810-grep.sh
diff --combined t/t7810-grep.sh
index 24e9b1974d17a02dd1c668e888a67f894e7a1209,cd32ac5eb5b56a02b70d5e348c0f2630d0da9ae9..523d04123d02cabb8703f91e9bec194c7d737f00
@@@ -47,13 -47,6 +47,13 @@@ test_expect_success setup 
        echo vvv >t/v &&
        mkdir t/a &&
        echo vvv >t/a/v &&
 +      {
 +              echo "line without leading space1"
 +              echo " line with leading space1"
 +              echo " line with leading space2"
 +              echo " line with leading space3"
 +              echo "line without leading space2"
 +      } >space &&
        git add . &&
        test_tick &&
        git commit -m initial
@@@ -351,11 -344,6 +351,11 @@@ test_expect_success 'grep -f, multiple 
        test_cmp expected actual
  '
  
 +test_expect_success 'grep, multiple patterns' '
 +      git grep "$(cat patterns)" >actual &&
 +      test_cmp expected actual
 +'
 +
  cat >expected <<EOF
  file:foo mmap bar
  file:foo_mmap bar
@@@ -399,17 -387,6 +399,6 @@@ test_expect_success 'grep -q, silently 
        test_cmp empty actual
  '
  
- # Create 1024 file names that sort between "y" and "z" to make sure
- # the two files are handled by different calls to an external grep.
- # This depends on MAXARGS in builtin-grep.c being 1024 or less.
- c32="0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v"
- test_expect_success 'grep -C1, hunk mark between files' '
-       for a in $c32; do for b in $c32; do : >y-$a$b; done; done &&
-       git add y-?? &&
-       git grep -C1 "^[yz]" >actual &&
-       test_cmp expected actual
- '
  test_expect_success 'grep -C1 hunk mark between files' '
        git grep -C1 "^[yz]" >actual &&
        test_cmp expected actual
@@@ -905,20 -882,4 +894,20 @@@ test_expect_success 'mimic ack-grep --g
        test_cmp expected actual
  '
  
 +cat >expected <<EOF
 +space: line with leading space1
 +space: line with leading space2
 +space: line with leading space3
 +EOF
 +
 +test_expect_success LIBPCRE 'grep -E "^ "' '
 +      git grep -E "^ " space >actual &&
 +      test_cmp expected actual
 +'
 +
 +test_expect_success LIBPCRE 'grep -P "^ "' '
 +      git grep -P "^ " space >actual &&
 +      test_cmp expected actual
 +'
 +
  test_done