tests: add post-args execution
authorJean Privat <jean@pryen.org>
Thu, 14 Mar 2013 09:29:34 +0000 (05:29 -0400)
committerJean Privat <jean@pryen.org>
Thu, 14 Mar 2013 09:29:34 +0000 (05:29 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

tests/sav/test_args_args4.res [new file with mode: 0644]
tests/test_args.args
tests/tests.sh

diff --git a/tests/sav/test_args_args4.res b/tests/sav/test_args_args4.res
new file mode 100644 (file)
index 0000000..5ed71b1
--- /dev/null
@@ -0,0 +1,5 @@
+nb args: 2
+args:
+       first
+       second
+hello
index 67b514b..a9a11e1 100644 (file)
@@ -1,3 +1,4 @@
 first second
 "first only" second
 this is some king of test, long and with some weird char$
+first second ; echo hello
index 8fcc039..c8a1eeb 100755 (executable)
@@ -375,7 +375,9 @@ END
                                                echo "NIT_NO_STACK=1 ./$ff.bin" $args
                                        fi
                                        test -z "$tap" && echo -n "==> args #"$cptr " "
-                                       sh -c "NIT_NO_STACK=1 $TIMEOUT ./$ff.bin  ''$args < $inputs > $fff.res 2>$fff.err"
+                                       echo "./$ff.bin $args" > "./$fff.bin"
+                                       chmod +x "./$fff.bin"
+                                       sh -c "NIT_NO_STACK=1 $TIMEOUT ./$fff.bin < $inputs > $fff.res 2>$fff.err"
                                        if [ "x$verbose" = "xtrue" ]; then
                                                cat "$fff.res"
                                                cat >&2 "$fff.err"