mirror of
https://github.com/moparisthebest/socat
synced 2024-11-10 11:05:04 -05:00
improve test for EXECSPACES to keep multiple spaces in arguments
This commit is contained in:
parent
31de787c8b
commit
67e59494c4
4
test.sh
4
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
|
||||
|
Loading…
Reference in New Issue
Block a user