revision: implement sparse algorithm
[gitweb.git] / t / t3001-ls-files-others-exclude.sh
index da257c020fb64d6b8af6b482339afd87f04fea75..1ec7cb57c7a81ff9258143e7c8d4a81dc96ff8dc 100755 (executable)
@@ -210,8 +210,7 @@ test_expect_success 'subdirectory ignore (toplevel)' '
                cd top &&
                git ls-files -o --exclude-standard
        ) >actual &&
-       >expect &&
-       test_cmp expect actual
+       test_must_be_empty actual
 '
 
 test_expect_success 'subdirectory ignore (l1/l2)' '
@@ -219,8 +218,7 @@ test_expect_success 'subdirectory ignore (l1/l2)' '
                cd top/l1/l2 &&
                git ls-files -o --exclude-standard
        ) >actual &&
-       >expect &&
-       test_cmp expect actual
+       test_must_be_empty actual
 '
 
 test_expect_success 'subdirectory ignore (l1)' '
@@ -228,8 +226,7 @@ test_expect_success 'subdirectory ignore (l1)' '
                cd top/l1 &&
                git ls-files -o --exclude-standard
        ) >actual &&
-       >expect &&
-       test_cmp expect actual
+       test_must_be_empty actual
 '
 
 test_expect_success 'show/hide empty ignored directory (setup)' '
@@ -251,8 +248,7 @@ test_expect_success 'hide empty ignored directory with --no-empty-directory' '
                cd top &&
                git ls-files -o -i --exclude l1 --directory --no-empty-directory
        ) >actual &&
-       >expect &&
-       test_cmp expect actual
+       test_must_be_empty actual
 '
 
 test_expect_success 'show/hide empty ignored sub-directory (setup)' '
@@ -277,14 +273,12 @@ test_expect_success 'hide empty ignored sub-directory with --no-empty-directory'
                cd top &&
                git ls-files -o -i --exclude l1 --directory --no-empty-directory
        ) >actual &&
-       >expect &&
-       test_cmp expect actual
+       test_must_be_empty actual
 '
 
 test_expect_success 'pattern matches prefix completely' '
-       : >expect &&
        git ls-files -i -o --exclude "/three/a.3[abc]" >actual &&
-       test_cmp expect actual
+       test_must_be_empty actual
 '
 
 test_expect_success 'ls-files with "**" patterns' '
@@ -300,34 +294,8 @@ EOF
 
 
 test_expect_success 'ls-files with "**" patterns and no slashes' '
-       : >expect &&
        git ls-files -o -i --exclude "one**a.1" >actual &&
-       test_cmp expect actual
-'
-
-test_expect_success 'negative patterns' '
-       git init reinclude &&
-       (
-               cd reinclude &&
-               cat >.gitignore <<-\EOF &&
-               /fooo
-               /foo
-               !foo/bar/bar
-               EOF
-               mkdir fooo &&
-               cat >fooo/.gitignore <<-\EOF &&
-               !/*
-               EOF
-               mkdir -p foo/bar &&
-               touch abc foo/def foo/bar/ghi foo/bar/bar &&
-               git ls-files -o --exclude-standard >../actual &&
-               cat >../expected <<-\EOF &&
-               .gitignore
-               abc
-               foo/bar/bar
-               EOF
-               test_cmp ../expected ../actual
-       )
+       test_must_be_empty actual
 '
 
 test_done