t9200: Work around HFS+ issues.
We at least know that the test as written has a problem in an environment where "touch '$p'; ls | fgrep '$p'" fails, and have a clear understand why it fails. This tests if the filesystem has that particular issue we know "git add" has a problem with, and skips the test in such an environment. This way, we might catch issues "git add" might have in other environments. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Feb 4, 2007 at 17:30 UTC
133f081057a99957d6d34aa1c4fec61e5c5d22d8
1 file changed
+14
t/t9200-git-cvsexportcommit.sh
+14
@@ -169,6 +169,16 @@ test_expect_success \
169
test "$(echo $(sort "G g/CVS/Entries"|cut -d/ -f2,3,5))" = "with spaces.png/1.2/-kb with spaces.txt/1.2/"
170
)'
171
172
+# Some filesystems mangle pathnames with UTF-8 characters --
173
+# check and skip
174
+if p="Å/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/å/ä/ö" &&
175
+ mkdir -p "tst/$p" &&
176
+ date >"tst/$p/day" &&
177
+ found=$(find tst -type f -print) &&
178
+ test "z$found" = "ztst/$p/day" &&
179
+ rm -fr tst
180
+then
181
+
182
# This test contains UTF-8 characters
183
test_expect_success \
184
'File with non-ascii file name' \
@@ -184,6 +194,10 @@ test_expect_success \
194
test "$(echo $(sort Å/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/å/ä/ö/CVS/Entries|cut -d/ -f2,3,5))" = "gårdetsågårdet.png/1.1/-kb gårdetsågårdet.txt/1.1/"
195
)'
196
197
+fi
198
+
199
+rm -fr tst
200
+
201
test_expect_success \
202
'Mismatching patch should fail' \
203
'date >>"E/newfile5.txt" &&