aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-04-05 21:09:20 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-04-05 21:09:20 -0400
commitd02a1bc55e70e238994fe5d98183cdc56a7221ee (patch)
tree780bce1a29631185662c74c950c06af1ac58121f /test
parent89e5cd6474486c4a2de14e05b85779aa3c24e648 (diff)
Tests for token formation
Diffstat (limited to 'test')
-rw-r--r--test/cases/token.bqn33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/cases/token.bqn b/test/cases/token.bqn
new file mode 100644
index 00000000..dfb4ad2e
--- /dev/null
+++ b/test/cases/token.bqn
@@ -0,0 +1,33 @@
+# Strings, comments, whitespace
+# Can't test LF inside quotes here
+"#"≡⥊'#'
+0 % ≠""#""
+1#+1\#'
+1 #,0⋄0
+1 #"␖
+ 1
+(@+9)≡' ' #tab
+
+# Juxtaposition
+@‿π ≡ ≍⟜π@
+·2⊸≡2
+6 % 33-⋆⟜3 3
+⊑=⟜'a'"a"
+F←-○≠ ⋄ "abcd"F"bcd"
+
+# Special names
+9 % 1⊸+{𝕗𝕗∘{𝕎𝕩}⍟𝕩𝕩}3
+0+{𝕎𝕏𝔽𝔾𝕊⋄1}-2
+! % {_𝕩}4
+! % 0{2_𝕣⋄𝕩} 1
+! % 0{1{𝕘⋄𝕗}𝕣𝕣⋄𝕩} 1
+
+# Variable names
+3 % a←3 ⋄ _A_
+under←π ⋄ uNdER_ ≡ u_n__d___e____r
+_f←{-𝕗} ⋄ ¯1 __f
+
+# Non-allowed characters (last is vertical tab)
+! % *
+! % ^
+! %