diff options
| author | kx <kx@radix-linux.su> | 2026-10-01 12:02:28 +0300 |
|---|---|---|
| committer | kx <kx@radix-linux.su> | 2026-10-01 12:02:28 +0300 |
| commit | ba1b04d64bdfaf377915b22f77520216ebe47674 (patch) | |
| tree | 044343035c28b2b04ca9725f26e9b7c39342d19c /tests/t0011-base-include-path.sh | |
| parent | 124b140798456778e2a96851cc7268aa9a726698 (diff) | |
| download | mcpu-cpp-1.0.2.tar.xz | |
Version 1.0.21.0.2
Diffstat (limited to 'tests/t0011-base-include-path.sh')
| -rwxr-xr-x | tests/t0011-base-include-path.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/t0011-base-include-path.sh b/tests/t0011-base-include-path.sh new file mode 100755 index 0000000..f862e88 --- /dev/null +++ b/tests/t0011-base-include-path.sh @@ -0,0 +1,19 @@ +#!/bin/sh +set -eu +dir="${TMPDIR-/tmp}/mcpu-cpp-basepath-$$" +mkdir -p "$dir" +trap 'rm -rf "$dir"' EXIT HUP INT TERM +cat > "$dir/config" <<EOT +MCPU_CPP_INCLUDE_PATH = $srcdir/data/lang-base; +EOT +"$MCPU_CPP" --config-file "$dir/config" "$srcdir/data/base-path-main.c" -o "$dir/base.out" +grep 'from_base_language_include_root' "$dir/base.out" >/dev/null +cat > "$dir/as.c" <<'EOT' +#lang "as" +#include <base.h> +#include <diff/explicit.h> +#endlang +EOT +"$MCPU_CPP" --config-file "$dir/config" "$dir/as.c" -o "$dir/as.out" +grep 'from_base_language_include_root' "$dir/as.out" >/dev/null +grep 'from_explicit_diff_subdirectory' "$dir/as.out" >/dev/null |
