aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/tests2/65_macro_concat_start.c2
-rw-r--r--tests/tests2/65_macro_concat_start.expect1
-rw-r--r--tests/tests2/66_macro_concat_end.c2
-rw-r--r--tests/tests2/66_macro_concat_end.expect1
-rw-r--r--tests/tests2/Makefile4
5 files changed, 9 insertions, 1 deletions
diff --git a/tests/tests2/65_macro_concat_start.c b/tests/tests2/65_macro_concat_start.c
new file mode 100644
index 0000000..d63d67a
--- /dev/null
+++ b/tests/tests2/65_macro_concat_start.c
@@ -0,0 +1,2 @@
+#define paste(A,B) ##A B
+paste(x,y)
diff --git a/tests/tests2/65_macro_concat_start.expect b/tests/tests2/65_macro_concat_start.expect
new file mode 100644
index 0000000..88ed6c5
--- /dev/null
+++ b/tests/tests2/65_macro_concat_start.expect
@@ -0,0 +1 @@
+65_macro_concat_start.c:1: error: '##' invalid at start of macro
diff --git a/tests/tests2/66_macro_concat_end.c b/tests/tests2/66_macro_concat_end.c
new file mode 100644
index 0000000..55dcaef
--- /dev/null
+++ b/tests/tests2/66_macro_concat_end.c
@@ -0,0 +1,2 @@
+#define paste(A,B) A B##
+paste(x,y)
diff --git a/tests/tests2/66_macro_concat_end.expect b/tests/tests2/66_macro_concat_end.expect
new file mode 100644
index 0000000..224e5c9
--- /dev/null
+++ b/tests/tests2/66_macro_concat_end.expect
@@ -0,0 +1 @@
+66_macro_concat_end.c:2: error: '##' invalid at end of macro
diff --git a/tests/tests2/Makefile b/tests/tests2/Makefile
index 36d84dc..41adb2d 100644
--- a/tests/tests2/Makefile
+++ b/tests/tests2/Makefile
@@ -79,7 +79,9 @@ TESTS = \
61_undefined_enum.test \
62_enumerator_redefinition.test \
63_local_enumerator_redefinition.test \
- 64_macro_nesting.test
+ 64_macro_nesting.test \
+ 65_macro_concat_start.test \
+ 66_macro_concat_end.test
# 30_hanoi.test -- seg fault in the code, gcc as well
# 34_array_assignment.test -- array assignment is not in C standard