On Sun, Mar 08, 2009 at 10:42:40AM -0400, Jeff King wrote: > 2. Have test_run_ canonicalize the snippet by removing trailing > newlines. > [...] > I think (2) is the most reasonable option of those choices. And here's what that would look like: diff --git a/t/test-lib.sh b/t/test-lib.sh index 7a847ec..276a14d 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -273,7 +273,7 @@ test_debug () { } test_run_ () { - eval >&3 2>&4 "$1" + eval >&3 2>&4 "`echo "$1" | sed -e :a -e '/^ *\n*$/{$d;N;ba' -e '}'`" eval_ret="$?" return 0 } That is a truly hideous sed expression, and I would be happy to hear more readable suggestions (it is based on one from the "sed one-liners" compilation). With this applied, t3505 passes for me. However, some other random tests are broken as a result. It looks like it might be related to an extra round of '\' expansion. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html