t4008: modernise style
[gitweb.git] / t / t4010-diff-pathspec.sh
index af5134b70c6b4898aa652907d58191d45aa30ac4..6219a2ec212ee6d19c2f17d2c3cb7fb6928084f0 100755 (executable)
@@ -56,7 +56,7 @@ test_expect_success \
      compare_diff_raw current expected'
 
 cat >expected <<\EOF
-:100644 100644 766498d93a4b06057a8e49d23f4068f1170ff38f 0a41e115ab61be0328a19b29f18cdcb49338d516 M     file0
+:100644 100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df dca6b92303befc93086aa025d90a5facd7eb2812 M     file0
 EOF
 test_expect_success \
     'limit to file0 should show file0' \
@@ -110,4 +110,17 @@ test_expect_success 'diff-tree -r with wildcard' '
        test_cmp expected result
 '
 
+test_expect_success 'diff multiple wildcard pathspecs' '
+       mkdir path2 &&
+       echo rezrov >path2/file1 &&
+       git update-index --add path2/file1 &&
+       tree3=`git write-tree` &&
+       git diff --name-only $tree $tree3 -- "path2*1" "path1*1" >actual &&
+       cat <<-\EOF >expect &&
+       path1/file1
+       path2/file1
+       EOF
+       test_cmp expect actual
+'
+
 test_done