aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/pp.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-11-16 12:11:18 +0100
committerlemon <lsof@mailbox.org>2025-11-16 12:11:18 +0100
commit111e71e1511b2abff9176bd6c714c8da796f770e (patch)
tree352b723c9144c844037447bd865a8366378df7a5 /test/pp.c
parentb0c0f2d2d885c5901de08ed08dba9fff079bf6e3 (diff)
basic automated testing
Diffstat (limited to 'test/pp.c')
-rw-r--r--test/pp.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/test/pp.c b/test/pp.c
deleted file mode 100644
index db90f23..0000000
--- a/test/pp.c
+++ /dev/null
@@ -1,55 +0,0 @@
-
-#include "pp.h"
-#include "pp.h"
-#include <stddef.h>
-#include <stdio.h>
-#include <wchar.h>
-#include <locale.h>
-//
-#define CATl(a) a##bar
-#define CATr(a) foo##a
-#define CAT(a,b) a##b
-#define foobar() foo##bar
-
-#define hash_hash # ## #
-#define mkstr(a) # a
-#define in_between(a) mkstr(a)
-#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)
-{
- int CATl(foo);
- ++foobar;
- --CATr(bar);
- CAT(foo,bar) += 3;
- foobar() /=2;
- printf("%s %s\n",STR ( ok /1 "\n"n ;.&
- 05.5), STR(ADD(1,2)));
- hi(ADD(Foo, SQR(Bar+1)));
- int foo123 = 77;
- printf("%s "
- "%s %g\n", str(Foo,5), xstr(Foo), CAT(1.5,e3f) + CAT(7,)-CAT(,1));
- printf("join: \"%s\"\n", p);
-
- setlocale(LC_ALL, "en_US.utf8");
-
- printf("wide\t L\"%ls\", U+%x\n", L"abc123 猫,€á💫", L'🦋');
-
- PUT\
-S\
-("Output ends here\\
-0Not printed" /* After line splicing, the remaining backslash
- * escapes the 0, ending the string early.
- */
-);
-
- CAT(ret,urn) 0;
-}