From 67e59494c466bbe81b1fc6c3e26a9fa153e102c3 Mon Sep 17 00:00:00 2001 From: Gerhard Rieger Date: Fri, 5 Sep 2008 00:22:35 +0200 Subject: [PATCH] improve test for EXECSPACES to keep multiple spaces in arguments --- test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.sh b/test.sh index 58b50d3..5b154a8 100755 --- a/test.sh +++ b/test.sh @@ -8291,11 +8291,11 @@ TEST="$NAME: correctly parse exec with consecutive spaces" $PRINTF "test $F_n $TEST... " $N tf="$td/test$N.stdout" te="$td/test$N.stderr" -da="test$N $(date) $RANDOM" +da="test$N $(date) $RANDOM" # with a double space tdiff="$td/test$N.diff" # put the test data as first argument after two spaces. expect the data in the # first argument of the exec'd command. -$SOCAT $opts -u "exec:\"bash -c \\\"echo \$1\\\" \\\"\\\" \\\"$da\\\"\"" - >"$tf" 2>"$te" +$SOCAT $opts -u "exec:\"bash -c \\\"echo \\\\\\\"\$1\\\\\\\"\\\" \\\"\\\" \\\"$da\\\"\"" - >"$tf" 2>"$te" rc=$? echo "$da" |diff - "$tf" >"$tdiff" if [ "$rc" -ne 0 ]; then