Fix t5516-fetch for systems where `wc -l` outputs whitespace.
[gitweb.git] / t / t3001-ls-files-others-exclude.sh
index fde2bb25fa0fb41c09b4e4c87de8b9d1c0f9c237..fcfcfbba7df50b55df7d002bf9745b912cfcae9b 100755 (executable)
@@ -65,10 +65,10 @@ test_expect_success \
        --exclude-per-directory=.gitignore \
        --exclude-from=.git/ignore \
        >output &&
-     diff -u expect output'
+     git diff expect output'
 
 # Test \r\n (MSDOS-like systems)
-echo -ne '*.1\r\n/*.3\r\n!*.6\r\n' >.gitignore
+printf '*.1\r\n/*.3\r\n!*.6\r\n' >.gitignore
 
 test_expect_success \
     'git-ls-files --others with \r\n line endings.' \
@@ -77,6 +77,26 @@ test_expect_success \
        --exclude-per-directory=.gitignore \
        --exclude-from=.git/ignore \
        >output &&
-     diff -u expect output'
+     git diff expect output'
+
+cat > excludes-file << EOF
+*.[1-8]
+e*
+EOF
+
+git-config core.excludesFile excludes-file
+
+git-runstatus | grep "^#       " > output
+
+cat > expect << EOF
+#      .gitignore
+#      a.6
+#      one/
+#      output
+#      three/
+EOF
+
+test_expect_success 'git-status honours core.excludesfile' \
+       'diff -u expect output'
 
 test_done