From: Andre Noll Date: Sun, 25 Sep 2016 13:56:43 +0000 (+0200) Subject: test-lib: Fix a bash-4.4 issue. X-Git-Tag: v0.5.7~23 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=33692c33f2effa9620064aec44c6196a8d830d05;ds=sidebyside test-lib: Fix a bash-4.4 issue. Apparently bash-4.4 changed how unquoted here strings are treated. We want to process only the first line of the output, so the right thing to do is to ask awk to exit after processing the first line. This works regardless of the bash version. --- diff --git a/t/test-lib.sh b/t/test-lib.sh index 99e575d3..1f9913e3 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -156,7 +156,7 @@ test_require_executables() test_duration() { local t=$(exec 2>&1 1>/dev/null; time -p "$@") - result=$(awk '{print $2 * 1000}' <<< $t) + result=$(awk '{print $2 * 1000; exit 0}' <<< "$t") } test_expect_success()