Code

MinGW: GCC >= 4 does not need SNPRINTF_SIZE_CORR anymore
[git.git] / t / t7002-grep.sh
index b81593780a2a6adaf34bb10293b607e3a303cfcd..f275af82403dc0f1de4c584074c0eb63e61a6704 100755 (executable)
@@ -16,12 +16,13 @@ test_expect_success setup '
                echo foo mmap bar_mmap
                echo foo_mmap bar mmap baz
        } >file &&
+       echo ww w >w &&
        echo x x xx x >x &&
        echo y yy >y &&
        echo zzz > z &&
        mkdir t &&
        echo test >t/t &&
-       git add file x y z t/t &&
+       git add file x y z t/t &&
        test_tick &&
        git commit -m initial
 '
@@ -48,6 +49,12 @@ do
                diff expected actual
        '
 
+       test_expect_success "grep -w $L (w)" '
+               : >expected &&
+               ! git grep -n -w -e "^w" >actual &&
+               test_cmp expected actual
+       '
+
        test_expect_success "grep -w $L (x)" '
                {
                        echo ${HC}x:1:x x xx x