diff options
-rwxr-xr-x | cppawk | 3 | ||||
-rw-r--r-- | testcases | 5 | ||||
-rw-r--r-- | testdir/program.cwk | 7 |
3 files changed, 14 insertions, 1 deletions
@@ -128,7 +128,8 @@ trap 'rm -f $tmp_file' EXIT INT TERM if [ -n "$awk_file" ] ; then tmp_file=$(mktemp) - $delhashbang "$awk_file" | $prepro $(syntax "$prepro_opts") - > $tmp_file + $delhashbang "$awk_file" | \ + $prepro $incopt$(dirname "$awk_file") $(syntax "$prepro_opts") - > $tmp_file [ $prepro_only ] \ && cat $tmp_file \ || $awk $(syntax "$awk_opts") -f $tmp_file "$@" @@ -121,3 +121,8 @@ BEGIN { } ./cppawk -v foo="'\"" 'BEGIN { print foo }' : '" +-- +23: +./cppawk -f testdir/program.cwk +: +73 diff --git a/testdir/program.cwk b/testdir/program.cwk new file mode 100644 index 0000000..58ea47c --- /dev/null +++ b/testdir/program.cwk @@ -0,0 +1,7 @@ +/* + * cppawk program + */ + +#include "header.cwh" + +BEGIN { print max(42, 73) } |