aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcppawk2
-rw-r--r--testcases14
-rw-r--r--testdir/header.cwh2
3 files changed, 17 insertions, 1 deletions
diff --git a/cppawk b/cppawk
index 6d56295..9a74cbf 100755
--- a/cppawk
+++ b/cppawk
@@ -77,7 +77,7 @@ while [ $# -gt 0 ] ; do
-M?* )
die "-M family of cpp options not supported"
;;
- -U* | -D* | -iquote* )
+ -U* | -D* | -I* | -iquote* )
prepro_opts="$prepro_opts $(shell_escape "$1")"
;;
-f )
diff --git a/testcases b/testcases
index 5aed49e..1c2e6c8 100644
--- a/testcases
+++ b/testcases
@@ -69,3 +69,17 @@ ERR
1
1
2
+--
+14:
+./cppawk -Itestdir '
+#include "header.cwh"
+BEGIN { print max(42, 73) }'
+:
+73
+--
+15:
+./cppawk -iquotetestdir '
+#include "header.cwh"
+BEGIN { print max(42, 73) }'
+:
+73
diff --git a/testdir/header.cwh b/testdir/header.cwh
new file mode 100644
index 0000000..73873ef
--- /dev/null
+++ b/testdir/header.cwh
@@ -0,0 +1,2 @@
+/* cppawk header file */
+#define max(a, b) ((a) > (b) ? (a) : (b))