aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/pp.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/pp.c')
-rw-r--r--test/pp.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/pp.c b/test/pp.c
index 51cf70f..85b4cba 100644
--- a/test/pp.c
+++ b/test/pp.c
@@ -3,6 +3,8 @@
#include "pp.h"
#include <stddef.h>
#include <stdio.h>
+#include <assert.h>
+#include <limits.h>
//
#define CATl(a) a##bar
#define CATr(a) foo##a
@@ -15,6 +17,12 @@
#define join(c, d) in_between(c hash_hash d)
char p[] = join(x, y); // equivalent to char p[] = "x ## y";
+#define PUTS p\
+u\
+t\
+s
+
+
int
main(void)
{
@@ -30,5 +38,15 @@ main(void)
printf("%s "
"%s %g\n", str(Foo,5), xstr(Foo), CAT(1.5,e3f) + CAT(7,)-CAT(,1));
printf("join: \"%s\"\n", p);
+
+ PUT\
+S\
+("Output ends here\\
+0Not printed" /* After line splicing, the remaining backslash
+ * escapes the 0, ending the string early.
+ */
+);
+
+
CAT(ret,urn) 0;
}