diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/093.sh | 5 | ||||
| -rw-r--r-- | tests/108.sh | 26 |
2 files changed, 29 insertions, 2 deletions
diff --git a/tests/093.sh b/tests/093.sh index fe0bda9..a22e168 100644 --- a/tests/093.sh +++ b/tests/093.sh @@ -13,7 +13,8 @@ int printf(); int main() { printf("%d\n", A(42)); - printf("%d\n", B(123)); - printf("%d\n", C(13, 17)); + printf("%d\n", B + (123)); + printf("%d\n", C (13, 17)); } EOF 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 |
