new file mode 100644
@@ -0,0 +1,13 @@
+3
+2
+1
+/*
+ * check-name: test-pipe-cmd
+ * check-command: sparse $file | sort
+ * check-output-start
+
+1
+2
+3
+ * check-output-end
+ */
@@ -106,8 +106,8 @@ do_test()
cmd=`eval echo $default_path/$default_cmd`
get_value "check-command" $file
if [ "$?" -eq "0" ]; then
- last_result=`echo $last_result | sed -e 's/^ *//'`
- cmd=`eval echo $default_path/$last_result`
+ last_result=`echo "$last_result" | sed -e 's/^ *//'`
+ cmd=`eval echo "\"$default_path/$last_result\""`
fi
# check for disabled commands
@@ -142,7 +142,7 @@ do_test()
# grab the actual output & exit value
- $cmd 1> $file.output.got 2> $file.error.got
+ eval $cmd 1> $file.output.got 2> $file.error.got
actual_exit_value=$?
for stream in output error; do
This can be usefull for filtering, transforming the normal output in order to normalize it so that it can be compared or to ignore things irrelevant to the test. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> --- validation/test-pipe-cmd.c | 13 +++++++++++++ validation/test-suite | 6 +++--- 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 validation/test-pipe-cmd.c