aboutsummaryrefslogtreecommitdiff
path: root/tests/programs/backtick.zc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/programs/backtick.zc')
-rw-r--r--tests/programs/backtick.zc9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/programs/backtick.zc b/tests/programs/backtick.zc
new file mode 100644
index 0000000..3610f70
--- /dev/null
+++ b/tests/programs/backtick.zc
@@ -0,0 +1,9 @@
+// a backtick ends the source only where the lexer would read it as a token.
+// this one, in a line comment: ` does not end anything.
+/* nor does this, in a block comment ` with a star / and a slash */
+fn main() {
+ let s = "a`b", t = "q\"`", c = '`', d = '\'';
+ put_n(len_w(s)); put_c(' '); put_n(len_w(t)); put_c(' '); put_n(c); put_c(' '); put_n(d); put_c(' ');
+ while (!eof()) put_c(get_c());
+ return 0;
+}