Reorganize tests into a real spec suite

This commit is contained in:
2024-08-04 19:18:43 -03:00
parent 57c160173c
commit e7c2053222
693 changed files with 136 additions and 116 deletions

View File

@ -0,0 +1,12 @@
---input---
f(1, a)
---tokens---
'f' Name.Function
'(' Punctuation
'1' Literal.Number
',' Punctuation
' ' Text.Whitespace
'a' Name
')' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,10 @@
---input---
7 % and % 8
---tokens---
'7' Literal.Number
' ' Text.Whitespace
'% and %' Operator
' ' Text.Whitespace
'8' Literal.Number
'\n' Text.Whitespace

View File

@ -0,0 +1,9 @@
---input---
.[1]
---tokens---
'.' Name
'[' Punctuation
'1' Literal.Number
']' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,10 @@
---input---
. <- 1
---tokens---
'.' Name
' ' Text.Whitespace
'<-' Operator
' ' Text.Whitespace
'1' Literal.Number
'\n' Text.Whitespace

View File

@ -0,0 +1,9 @@
---input---
a[1]
---tokens---
'a' Name
'[' Punctuation
'1' Literal.Number
']' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
._a_2.c
---tokens---
'._a_2.c' Name
'\n' Text.Whitespace

View File

@ -0,0 +1,8 @@
# Invalid names are valid if backticks are used
---input---
`.1 blah`
---tokens---
'`.1 blah`' Name
'\n' Text.Whitespace

View File

@ -0,0 +1,8 @@
# Internal backticks can be escaped
---input---
`.1 \` blah`
---tokens---
'`.1 \\` blah`' Name
'\n' Text.Whitespace