Andreas Gruenbacher wrote: ... > Note that the test case might not survive sending over email as it > contains a special character. Maybe the test case can be turned into > plain text somehow and stay reasonably portable. ... > diff --git a/tests/filename-quoting b/tests/filename-quoting > new file mode 100755 > index 0000000..d06ff60
I guess the ^A (0x01) was what you meant, but I'd suggest also replacing a couple of TABs in nearby code. I'll be happy to include this change in your patch: diff --git a/tests/filename-quoting b/tests/filename-quoting index d06ff60..e3e9193 100755 --- a/tests/filename-quoting +++ b/tests/filename-quoting @@ -48,9 +48,12 @@ cat <<EOF > exp || fail=1 +one EOF -echo tab > "a/ " || fail=1 -echo one > "b/" || fail=1 -diff -u "a/ " "b/" > out 2> err; test $? = 1 || fail=1 +tab=$(printf '\t') +x01=$(printf '\001') + +echo tab > "a/$tab" || fail=1 +echo one > "b/$x01" || fail=1 +diff -u "a/$tab" "b/$x01" > out 2> err; test $? = 1 || fail=1 # Remove date and time. sed -e 's/^\([-+*][-+*][-+*] [^ ]*\) .*/\1/' out > k; mv k out compare exp out || fail=1
