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:
19
spec/tests/ruby/test_escaped_bracestring.txt
Normal file
19
spec/tests/ruby/test_escaped_bracestring.txt
Normal file
@ -0,0 +1,19 @@
|
||||
---input---
|
||||
str.gsub(%r{\\\\}, "/")
|
||||
|
||||
---tokens---
|
||||
'str' Name
|
||||
'.' Operator
|
||||
'gsub' Name
|
||||
'(' Punctuation
|
||||
'%r{' Literal.String.Regex
|
||||
'\\\\' Literal.String.Regex
|
||||
'\\\\' Literal.String.Regex
|
||||
'}' Literal.String.Regex
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'"' Literal.String.Double
|
||||
'/' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
')' Punctuation
|
||||
'\n' Text.Whitespace
|
56
spec/tests/ruby/test_interpolation_nested_curly.txt
Normal file
56
spec/tests/ruby/test_interpolation_nested_curly.txt
Normal file
@ -0,0 +1,56 @@
|
||||
---input---
|
||||
"A#{ (3..5).group_by { |x| x/2}.map do |k,v| "#{k}" end.join }" + "Z"
|
||||
|
||||
---tokens---
|
||||
'"' Literal.String.Double
|
||||
'A' Literal.String.Double
|
||||
'#{' Literal.String.Interpol
|
||||
' ' Text.Whitespace
|
||||
'(' Punctuation
|
||||
'3' Literal.Number.Integer
|
||||
'..' Operator
|
||||
'5' Literal.Number.Integer
|
||||
')' Punctuation
|
||||
'.' Operator
|
||||
'group_by' Name
|
||||
' ' Text.Whitespace
|
||||
'{' Literal.String.Interpol
|
||||
' ' Text.Whitespace
|
||||
'|' Operator
|
||||
'x' Name
|
||||
'|' Operator
|
||||
' ' Text.Whitespace
|
||||
'x' Name
|
||||
'/' Operator
|
||||
'2' Literal.Number.Integer
|
||||
'}' Literal.String.Interpol
|
||||
'.' Operator
|
||||
'map' Name
|
||||
' ' Text.Whitespace
|
||||
'do' Keyword
|
||||
' ' Text.Whitespace
|
||||
'|' Operator
|
||||
'k' Name
|
||||
',' Punctuation
|
||||
'v' Name
|
||||
'|' Operator
|
||||
' ' Text.Whitespace
|
||||
'"' Literal.String.Double
|
||||
'#{' Literal.String.Interpol
|
||||
'k' Name
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
' ' Text.Whitespace
|
||||
'end' Keyword
|
||||
'.' Operator
|
||||
'join' Name
|
||||
' ' Text.Whitespace
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
' ' Text.Whitespace
|
||||
'+' Operator
|
||||
' ' Text.Whitespace
|
||||
'"' Literal.String.Double
|
||||
'Z' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
9
spec/tests/ruby/test_operator_methods.txt
Normal file
9
spec/tests/ruby/test_operator_methods.txt
Normal file
@ -0,0 +1,9 @@
|
||||
---input---
|
||||
x.==4
|
||||
|
||||
---tokens---
|
||||
'x' Name
|
||||
'.' Operator
|
||||
'==' Name.Operator
|
||||
'4' Literal.Number.Integer
|
||||
'\n' Text.Whitespace
|
8
spec/tests/ruby/test_range_syntax1.txt
Normal file
8
spec/tests/ruby/test_range_syntax1.txt
Normal file
@ -0,0 +1,8 @@
|
||||
---input---
|
||||
1..3
|
||||
|
||||
---tokens---
|
||||
'1' Literal.Number.Integer
|
||||
'..' Operator
|
||||
'3' Literal.Number.Integer
|
||||
'\n' Text.Whitespace
|
8
spec/tests/ruby/test_range_syntax2.txt
Normal file
8
spec/tests/ruby/test_range_syntax2.txt
Normal file
@ -0,0 +1,8 @@
|
||||
---input---
|
||||
1...3
|
||||
|
||||
---tokens---
|
||||
'1' Literal.Number.Integer
|
||||
'...' Operator
|
||||
'3' Literal.Number.Integer
|
||||
'\n' Text.Whitespace
|
10
spec/tests/ruby/test_range_syntax3.txt
Normal file
10
spec/tests/ruby/test_range_syntax3.txt
Normal file
@ -0,0 +1,10 @@
|
||||
---input---
|
||||
1 .. 3
|
||||
|
||||
---tokens---
|
||||
'1' Literal.Number.Integer
|
||||
' ' Text.Whitespace
|
||||
'..' Operator
|
||||
' ' Text.Whitespace
|
||||
'3' Literal.Number.Integer
|
||||
'\n' Text.Whitespace
|
Reference in New Issue
Block a user