ref: b868a47d2e43c8f622f2a0f65a926dd1c6c33a96
parent: 9fbfbfa441fb3354422e52928d7f3af02d1ea2ad
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sun Aug 26 16:07:15 EDT 2018
[tests/scc] Add test 0190-stringize.c This test checks the correct expansion of string operator and how it escapes special characters.
--- /dev/null
+++ b/tests/scc/execute/0190-stringize.c
@@ -1,0 +1,17 @@
+
+#define XSTR(x) #x
+#define STR(x) XSTR(x)
+#define S y = "str"
+
+int
+main()
+{
+ char *s, *t = STR(S);
+
+ for (s = "y = \"str\""; *s && *t; ++s, ++t) {
+ if (*s != *t)
+ return 1;
+ }
+
+ return 0;
+}
--- a/tests/scc/execute/scc-tests.lst
+++ b/tests/scc/execute/scc-tests.lst
@@ -170,3 +170,4 @@
0177-literal.c [TODO]
0178-include.c [TODO]
0179-sizeof.c [TODO]
+0190-stringize.c [TODO]