mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 06:33:06 -03:00
Reorganize tests into a real spec suite
This commit is contained in:
28
spec/tests/bqn/test_arguments.txt
Normal file
28
spec/tests/bqn/test_arguments.txt
Normal file
@ -0,0 +1,28 @@
|
||||
---input---
|
||||
Ambiv ← { ⟨1,𝕩⟩ ; ⟨2,𝕨,𝕩⟩ }
|
||||
|
||||
---tokens---
|
||||
'Ambiv' Operator
|
||||
' ' Text.Whitespace
|
||||
'←' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'{' Keyword.Type
|
||||
' ' Text.Whitespace
|
||||
'⟨' Punctuation
|
||||
'1' Literal.Number
|
||||
',' Punctuation
|
||||
'𝕩' Name.Entity
|
||||
'⟩' Punctuation
|
||||
' ' Text.Whitespace
|
||||
';' Name.Entity
|
||||
' ' Text.Whitespace
|
||||
'⟨' Punctuation
|
||||
'2' Literal.Number
|
||||
',' Punctuation
|
||||
'𝕨' Name.Entity
|
||||
',' Punctuation
|
||||
'𝕩' Name.Entity
|
||||
'⟩' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'}' Keyword.Type
|
||||
'\n' Text.Whitespace
|
12
spec/tests/bqn/test_comment.txt
Normal file
12
spec/tests/bqn/test_comment.txt
Normal file
@ -0,0 +1,12 @@
|
||||
---input---
|
||||
'#' - 1 #This is the comment
|
||||
|
||||
---tokens---
|
||||
"'#'" Literal.String.Single
|
||||
' ' Text.Whitespace
|
||||
'-' Operator
|
||||
' ' Text.Whitespace
|
||||
'1' Literal.Number
|
||||
' ' Text.Whitespace
|
||||
'#This is the comment' Comment.Single
|
||||
'\n' Text.Whitespace
|
42
spec/tests/bqn/test_define.txt
Normal file
42
spec/tests/bqn/test_define.txt
Normal file
@ -0,0 +1,42 @@
|
||||
---input---
|
||||
⟨alias⇐a, b⟩ ← {
|
||||
b‿c⇐
|
||||
a⇐2
|
||||
c←÷b↩1+a
|
||||
}
|
||||
|
||||
---tokens---
|
||||
'⟨' Punctuation
|
||||
'alias' Name.Variable
|
||||
'⇐' Keyword.Declaration
|
||||
'a' Name.Variable
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'b' Name.Variable
|
||||
'⟩' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'←' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'{' Keyword.Type
|
||||
'\n ' Text.Whitespace
|
||||
'b' Name.Variable
|
||||
'‿' Punctuation
|
||||
'c' Name.Variable
|
||||
'⇐' Keyword.Declaration
|
||||
'\n ' Text.Whitespace
|
||||
'a' Name.Variable
|
||||
'⇐' Keyword.Declaration
|
||||
'2' Literal.Number
|
||||
'\n ' Text.Whitespace
|
||||
'c' Name.Variable
|
||||
'←' Keyword.Declaration
|
||||
'÷' Operator
|
||||
'b' Name.Variable
|
||||
'↩' Keyword.Declaration
|
||||
'1' Literal.Number
|
||||
'+' Operator
|
||||
'a' Name.Variable
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'}' Keyword.Type
|
||||
'\n' Text.Whitespace
|
23
spec/tests/bqn/test_syntax_roles.txt
Normal file
23
spec/tests/bqn/test_syntax_roles.txt
Normal file
@ -0,0 +1,23 @@
|
||||
---input---
|
||||
⟨ט,√⟩ {𝕎𝕩}⌜ 1‿4‿9
|
||||
|
||||
---tokens---
|
||||
'⟨' Punctuation
|
||||
'×' Operator
|
||||
'˜' Name.Attribute
|
||||
',' Punctuation
|
||||
'√' Operator
|
||||
'⟩' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'{' Keyword.Type
|
||||
'𝕎' Operator
|
||||
'𝕩' Name.Entity
|
||||
'}' Keyword.Type
|
||||
'⌜' Name.Attribute
|
||||
' ' Text.Whitespace
|
||||
'1' Literal.Number
|
||||
'‿' Punctuation
|
||||
'4' Literal.Number
|
||||
'‿' Punctuation
|
||||
'9' Literal.Number
|
||||
'\n' Text.Whitespace
|
Reference in New Issue
Block a user