diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-03-18 08:07:49 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-03-18 08:07:49 -0700 |
commit | bdd2a4913eaa0f1d3721979058b53e181832cfa8 (patch) | |
tree | 4352e0dda211a865b3dc8d60e1a31256486b3f5d | |
parent | e8773eaa71ecbe1a44f8d88583735c596dbfd99e (diff) | |
download | cppawk-bdd2a4913eaa0f1d3721979058b53e181832cfa8.tar.gz cppawk-bdd2a4913eaa0f1d3721979058b53e181832cfa8.tar.bz2 cppawk-bdd2a4913eaa0f1d3721979058b53e181832cfa8.zip |
Fix missing: pass -I to preprocessor.
-rwxr-xr-x | cppawk | 2 | ||||
-rw-r--r-- | testcases | 14 | ||||
-rw-r--r-- | testdir/header.cwh | 2 |
3 files changed, 17 insertions, 1 deletions
@@ -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 ) @@ -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)) |