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/t0017-macro-errors.sh | |
| parent | 124b140798456778e2a96851cc7268aa9a726698 (diff) | |
| download | mcpu-cpp-1.0.2.tar.xz | |
Version 1.0.21.0.2
Diffstat (limited to 'tests/t0017-macro-errors.sh')
| -rwxr-xr-x | tests/t0017-macro-errors.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/t0017-macro-errors.sh b/tests/t0017-macro-errors.sh new file mode 100755 index 0000000..f54f74c --- /dev/null +++ b/tests/t0017-macro-errors.sh @@ -0,0 +1,13 @@ +#!/bin/sh +set -eu +src="${TMPDIR-/tmp}/mcpu-cpp-macro-errors-$$.c" +out="${TMPDIR-/tmp}/mcpu-cpp-macro-errors-$$.out" +err="${TMPDIR-/tmp}/mcpu-cpp-macro-errors-$$.err" +trap 'rm -f "$src" "$out" "$err"' EXIT HUP INT TERM +cat > "$src" <<'EOT' +#define +EOT +if "$MCPU_CPP" --no-config "$src" -o "$out" 2>"$err"; then + exit 1 +fi +grep 'macro name expected after #define' "$err" >/dev/null |
