From 101ae534bd5d7f58da6bb8b64d9f5b0127babe05 Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Wed, 24 Sep 2014 19:42:44 +0200 Subject: [PATCH] t2025: Tell tail explicitly to read from stdin Our current version of bash 3.1.17(5) can not parse the following snippet correctly p=abcd abspath=/$p subdir="x$(echo "$p" | tail -c $((253 - ${#abspath})))" as it returns tail: cannot open `253' for reading: No such file or directory This is fixed in bash 3.1.20(4), I did not check earlier versions. Signed-off-by: Thomas Braun --- t/t2025-checkout-long-paths.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t2025-checkout-long-paths.sh b/t/t2025-checkout-long-paths.sh index 0b8dd633c7..e65a38da4d 100755 --- a/t/t2025-checkout-long-paths.sh +++ b/t/t2025-checkout-long-paths.sh @@ -63,7 +63,7 @@ test_set_prereq SHORTABSPATH test_expect_success SHORTABSPATH 'clean up path close to MAX_PATH' ' p=/123456789abcdef/123456789abcdef/123456789abcdef/123456789abc/ef && p=y$p$p$p$p && - subdir="x$(echo "$p" | tail -c $((253 - ${#abspath})))" && + subdir="x$(echo "$p" | tail -c $((253 - ${#abspath})) - )" && # Now, $abspath/$subdir has exactly 254 characters, and is inside CWD p2="$abspath/$subdir" && test 254 = ${#p2} &&