aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcppawk16
-rw-r--r--testcases5
2 files changed, 21 insertions, 0 deletions
diff --git a/cppawk b/cppawk
index 3a2b3c0..35cfffb 100755
--- a/cppawk
+++ b/cppawk
@@ -151,6 +151,22 @@ while [ $# -gt 0 ] ; do
shift
done
+case $awk in
+ 'command '* )
+ ;;
+ * )
+ awk="command $awk"
+ ;;
+esac
+
+case $prepro in
+ 'command '* )
+ ;;
+ * )
+ prepro="command $prepro"
+ ;;
+esac
+
trap 'rm -f $tmp_file' EXIT INT TERM
if [ -n "$awk_file" ] ; then
diff --git a/testcases b/testcases
index 3eb492d..8758398 100644
--- a/testcases
+++ b/testcases
@@ -198,3 +198,8 @@ mawk=1
./cppawk --prepro-only --awk=mawk gawk=__gawk__ | grep gawk
:
gawk=__gawk__
+--
+36:
+./cppawk --prepro=die --prepro-only x 2>&1 | grep 'not found'
+:
+./cppawk: 1: eval: die: not found