@matheusbsbs / matheus-bagliano / commits / a0beb1326c
Fork 0

t/t3902-quoted: change from skip_all=* to prereq skip

Change this test to skip test with test prerequisites, and to do setup work in tests. This improves the skipped statistics on platforms where the test isn't run. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Aug 11, 2010 at 19:04 UTC a0beb1326c5de2e9859f91c8ed5b9108a6454660
1 file changed +21 -17
t/t3902-quoted.sh
+21 -17
@@ -15,11 +15,13 @@ LF='
15 DQ='"'
16
17 echo foo 2>/dev/null > "Name and an${HT}HT"
18 -test -f "Name and an${HT}HT" || {
19 - # since FAT/NTFS does not allow tabs in filenames, skip this test
20 - skip_all='Your filesystem does not allow tabs in filenames, test skipped.'
21 - test_done
22 -}
18 +if ! test -f "Name and an${HT}HT"
19 +then
20 + # FAT/NTFS does not allow tabs in filenames
21 + say 'Your filesystem does not allow tabs in filenames'
22 +else
23 + test_set_prereq TABS_IN_FILENAMES
24 +fi
25
26 for_each_name () {
27 for name in \
@@ -31,7 +33,7 @@ for_each_name () {
33 done
34 }
35
34 -test_expect_success setup '
36 +test_expect_success TABS_IN_FILENAMES 'setup' '
37
38 mkdir "$FN" &&
39 for_each_name "echo initial >\"\$name\""
@@ -45,6 +47,7 @@ test_expect_success setup '
47
48 '
49
50 +test_expect_success TABS_IN_FILENAMES 'setup expected files' '
51 cat >expect.quoted <<\EOF
52 Name
53 "Name and a\nLF"
@@ -72,75 +75,76 @@ With SP in it
75 濱野/file
76 濱野純
77 EOF
78 +'
79
76 -test_expect_success 'check fully quoted output from ls-files' '
80 +test_expect_success TABS_IN_FILENAMES 'check fully quoted output from ls-files' '
81
82 git ls-files >current && test_cmp expect.quoted current
83
84 '
85
82 -test_expect_success 'check fully quoted output from diff-files' '
86 +test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-files' '
87
88 git diff --name-only >current &&
89 test_cmp expect.quoted current
90
91 '
92
89 -test_expect_success 'check fully quoted output from diff-index' '
93 +test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-index' '
94
95 git diff --name-only HEAD >current &&
96 test_cmp expect.quoted current
97
98 '
99
96 -test_expect_success 'check fully quoted output from diff-tree' '
100 +test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-tree' '
101
102 git diff --name-only HEAD^ HEAD >current &&
103 test_cmp expect.quoted current
104
105 '
106
103 -test_expect_success 'check fully quoted output from ls-tree' '
107 +test_expect_success TABS_IN_FILENAMES 'check fully quoted output from ls-tree' '
108
109 git ls-tree --name-only -r HEAD >current &&
110 test_cmp expect.quoted current
111
112 '
113
110 -test_expect_success 'setting core.quotepath' '
114 +test_expect_success TABS_IN_FILENAMES 'setting core.quotepath' '
115
116 git config --bool core.quotepath false
117
118 '
119
116 -test_expect_success 'check fully quoted output from ls-files' '
120 +test_expect_success TABS_IN_FILENAMES 'check fully quoted output from ls-files' '
121
122 git ls-files >current && test_cmp expect.raw current
123
124 '
125
122 -test_expect_success 'check fully quoted output from diff-files' '
126 +test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-files' '
127
128 git diff --name-only >current &&
129 test_cmp expect.raw current
130
131 '
132
129 -test_expect_success 'check fully quoted output from diff-index' '
133 +test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-index' '
134
135 git diff --name-only HEAD >current &&
136 test_cmp expect.raw current
137
138 '
139
136 -test_expect_success 'check fully quoted output from diff-tree' '
140 +test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-tree' '
141
142 git diff --name-only HEAD^ HEAD >current &&
143 test_cmp expect.raw current
144
145 '
146
143 -test_expect_success 'check fully quoted output from ls-tree' '
147 +test_expect_success TABS_IN_FILENAMES 'check fully quoted output from ls-tree' '
148
149 git ls-tree --name-only -r HEAD >current &&
150 test_cmp expect.raw current