Merge branch 'mm/phrase-remote-tracking'
[gitweb.git] / t / t3902-quoted.sh
index 29103f65dc60a81d071b9dd5600f416b3a31860f..da82b655b3b33520b2c39d3992bc40368bf652be 100755 (executable)
@@ -15,11 +15,13 @@ LF='
 DQ='"'
 
 echo foo 2>/dev/null > "Name and an${HT}HT"
-test -f "Name and an${HT}HT" || {
-       # since FAT/NTFS does not allow tabs in filenames, skip this test
-       say 'Your filesystem does not allow tabs in filenames, test skipped.'
-       test_done
-}
+if ! test -f "Name and an${HT}HT"
+then
+       # FAT/NTFS does not allow tabs in filenames
+       say 'Your filesystem does not allow tabs in filenames'
+else
+       test_set_prereq TABS_IN_FILENAMES
+fi
 
 for_each_name () {
        for name in \
@@ -31,21 +33,22 @@ for_each_name () {
        done
 }
 
-test_expect_success setup '
+test_expect_success TABS_IN_FILENAMES 'setup' '
 
        mkdir "$FN" &&
-       for_each_name "echo initial >\"\$name\""
+       for_each_name "echo initial >\"\$name\"" &&
        git add . &&
        git commit -q -m Initial &&
 
        for_each_name "echo second >\"\$name\"" &&
-       git commit -a -m Second
+       git commit -a -m Second &&
 
        for_each_name "echo modified >\"\$name\""
 
 '
 
-cat >expect.quoted <<\EOF
+test_expect_success TABS_IN_FILENAMES 'setup expected files' '
+cat >expect.quoted <<\EOF &&
 Name
 "Name and a\nLF"
 "Name and an\tHT"
@@ -72,75 +75,76 @@ With SP in it
 濱野/file
 濱野純
 EOF
+'
 
-test_expect_success 'check fully quoted output from ls-files' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from ls-files' '
 
        git ls-files >current && test_cmp expect.quoted current
 
 '
 
-test_expect_success 'check fully quoted output from diff-files' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-files' '
 
        git diff --name-only >current &&
        test_cmp expect.quoted current
 
 '
 
-test_expect_success 'check fully quoted output from diff-index' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-index' '
 
        git diff --name-only HEAD >current &&
        test_cmp expect.quoted current
 
 '
 
-test_expect_success 'check fully quoted output from diff-tree' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-tree' '
 
        git diff --name-only HEAD^ HEAD >current &&
        test_cmp expect.quoted current
 
 '
 
-test_expect_success 'check fully quoted output from ls-tree' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from ls-tree' '
 
        git ls-tree --name-only -r HEAD >current &&
        test_cmp expect.quoted current
 
 '
 
-test_expect_success 'setting core.quotepath' '
+test_expect_success TABS_IN_FILENAMES 'setting core.quotepath' '
 
        git config --bool core.quotepath false
 
 '
 
-test_expect_success 'check fully quoted output from ls-files' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from ls-files' '
 
        git ls-files >current && test_cmp expect.raw current
 
 '
 
-test_expect_success 'check fully quoted output from diff-files' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-files' '
 
        git diff --name-only >current &&
        test_cmp expect.raw current
 
 '
 
-test_expect_success 'check fully quoted output from diff-index' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-index' '
 
        git diff --name-only HEAD >current &&
        test_cmp expect.raw current
 
 '
 
-test_expect_success 'check fully quoted output from diff-tree' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-tree' '
 
        git diff --name-only HEAD^ HEAD >current &&
        test_cmp expect.raw current
 
 '
 
-test_expect_success 'check fully quoted output from ls-tree' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from ls-tree' '
 
        git ls-tree --name-only -r HEAD >current &&
        test_cmp expect.raw current