diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh
index a29ae45b399f89123f886f5b35580bcdc0e803f1..0d600163c8284a318fbd21f3a00dd7853b2f8956 100755 (executable)
--- a/t/t7810-grep.sh
+++ b/t/t7810-grep.sh
test_cmp expected actual
'
+cat >expected <<EOF
+hello.c=int main(int argc, const char **argv)
+hello.c-{
+hello.c- printf("Hello world.\n");
+hello.c: return 0;
+hello.c- /* char ?? */
+hello.c-}
+EOF
+
+test_expect_success 'grep -W' '
+ git grep -W return >actual &&
+ test_cmp expected actual
+'
+
test_expect_success 'grep from a subdirectory to search wider area (1)' '
mkdir -p s &&
(