]> pd.if.org Git - lice/blobdiff - tests/line.c
autocommit for files dated 2014-11-17 20:13:36
[lice] / tests / line.c
diff --git a/tests/line.c b/tests/line.c
new file mode 100644 (file)
index 0000000..75921bf
--- /dev/null
@@ -0,0 +1,35 @@
+// line continuation
+
+int \
+main \
+( \
+    void // \
+        \
+    // one empty space to compensate
+) { \
+    int \
+    a   \
+    =   \
+    0,  \
+    *b  \
+    =   \
+    &a; \
+
+    expecti(*b, a); // line continuation should make the above
+                    // int a=0,*b=&a;
+
+    /* \
+     * \
+     * \\ int *e=b; /
+     */
+
+    // would error if int *e made it as code
+    int e = 0; // \
+        comments  \
+        comments  \
+        e = 1;
+
+    expecti(e, 0); // error if e = 1 made it
+
+    return e;   // e == 0 (success)
+}