mirror of
https://repo.or.cz/socat.git
synced 2025-01-08 22:12:33 +00:00
improve test for EXECSPACES to keep multiple spaces in arguments
This commit is contained in:
parent
31de787c8b
commit
67e59494c4
1 changed files with 2 additions and 2 deletions
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 a new issue