aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcppawk2
-rw-r--r--testcases5
-rwxr-xr-xtestdir/testdel3
3 files changed, 9 insertions, 1 deletions
diff --git a/cppawk b/cppawk
index bd80d4c..f33cab8 100755
--- a/cppawk
+++ b/cppawk
@@ -151,7 +151,7 @@ while [ $# -gt 0 ] ; do
shift
done
-awk="exec $(quote "$awk")"
+awk="command $(quote "$awk")"
prepro="command $(quote "$prepro")"
trap 'rm -f $tmp_file' EXIT INT TERM
diff --git a/testcases b/testcases
index 9f88f67..2711d4b 100644
--- a/testcases
+++ b/testcases
@@ -200,3 +200,8 @@ gawk=__gawk__
./cppawk --prepro=die --prepro-only x 2>&1 | grep 'not found'
:
./cppawk: 1: eval: die: not found
+--
+37:
+tmp=$(./cppawk --awk=testdir/testdel 1); [ -e $tmp ] || echo gone
+:
+gone
diff --git a/testdir/testdel b/testdir/testdel
new file mode 100755
index 0000000..f6339c8
--- /dev/null
+++ b/testdir/testdel
@@ -0,0 +1,3 @@
+#!/bin/sh
+[ "$1" = "-f" ] || exit 1
+printf "%s\n" "$2"