diff options
Diffstat (limited to 'tests/t0004-config.sh')
| -rwxr-xr-x | tests/t0004-config.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/t0004-config.sh b/tests/t0004-config.sh new file mode 100755 index 0000000..d025d99 --- /dev/null +++ b/tests/t0004-config.sh @@ -0,0 +1,12 @@ +#!/bin/sh +set -eu +out="${TMPDIR-/tmp}/mcpu-cpp-config-$$.out" +conf="${TMPDIR-/tmp}/mcpu-cpp-config-$$.conf" +trap 'rm -f "$out" "$conf"' EXIT HUP INT TERM +cat > "$conf" <<EOT +MCPU_CPP_INCLUDE_PATH = $srcdir/data/include; +MCPU_CPP_SYSTEM_INCLUDE_PATH = $srcdir/data/system; +EOT +"$MCPU_CPP" --config-file "$conf" "$srcdir/data/config-main.c" -o "$out" +grep 'from_one' "$out" >/dev/null +grep 'from_system' "$out" >/dev/null |
