diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-08-30 18:04:46 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-08-30 23:48:38 +0900 |
| commit | 75193c09f1dfcb3c7c726e5492f973a43402e270 (patch) | |
| tree | a276042945eab73eba5f0bf3cfdce0e298fb6de9 /tests/108.sh | |
| parent | d08eca233036108dc46406788adbcec1a97af86c (diff) | |
| download | ducc-75193c09f1dfcb3c7c726e5492f973a43402e270.tar.gz ducc-75193c09f1dfcb3c7c726e5492f973a43402e270.tar.zst ducc-75193c09f1dfcb3c7c726e5492f973a43402e270.zip | |
fix: parsing macro syntax
Diffstat (limited to 'tests/108.sh')
| -rw-r--r-- | tests/108.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/108.sh b/tests/108.sh new file mode 100644 index 0000000..7dab53b --- /dev/null +++ b/tests/108.sh @@ -0,0 +1,26 @@ +cat <<'EOF' > expected +123 +EOF +test_diff <<'EOF' +#define A(x) x + +int printf(); + +int main() { + printf("%d\n", A ( 123 )); +} +EOF + +cat <<'EOF' > expected +main.c:4: expected ')', but got '<new-line>' +EOF +test_compile_error <<'EOF' +#define A(x) x + +int main() { +#if A ( + 123) < A(345) + printf("1\n"); +#endif +} +EOF |
