mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-27 22:57:50 -03:00
Imported test cases from pygments
This commit is contained in:
16
tests/praat/test_broken_unquoted_string.txt
Normal file
16
tests/praat/test_broken_unquoted_string.txt
Normal file
@ -0,0 +1,16 @@
|
||||
---input---
|
||||
printline string
|
||||
... 'interpolated' string
|
||||
|
||||
---tokens---
|
||||
'printline' Keyword
|
||||
' ' Text.Whitespace
|
||||
'string' Literal.String
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'...' Punctuation
|
||||
' ' Text.Whitespace
|
||||
"'interpolated'" Literal.String.Interpol
|
||||
' ' Text.Whitespace
|
||||
'string' Literal.String
|
||||
'\n' Text.Whitespace
|
20
tests/praat/test_function_call.txt
Normal file
20
tests/praat/test_function_call.txt
Normal file
@ -0,0 +1,20 @@
|
||||
---input---
|
||||
selected("Sound", i+(a*b))
|
||||
|
||||
---tokens---
|
||||
'selected' Name.Function
|
||||
'(' Punctuation
|
||||
'"' Literal.String
|
||||
'Sound' Literal.String
|
||||
'"' Literal.String
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'i' Text
|
||||
'+' Operator
|
||||
'(' Text
|
||||
'a' Text
|
||||
'*' Operator
|
||||
'b' Text
|
||||
')' Punctuation
|
||||
')' Punctuation
|
||||
'\n' Text.Whitespace
|
27
tests/praat/test_inline_if.txt
Normal file
27
tests/praat/test_inline_if.txt
Normal file
@ -0,0 +1,27 @@
|
||||
---input---
|
||||
var = if true == 1 then -1 else 0 fi
|
||||
|
||||
---tokens---
|
||||
'var' Text
|
||||
' ' Text.Whitespace
|
||||
'=' Operator
|
||||
' ' Text.Whitespace
|
||||
'if' Keyword
|
||||
' ' Text.Whitespace
|
||||
'true' Text
|
||||
' ' Text.Whitespace
|
||||
'==' Operator
|
||||
' ' Text.Whitespace
|
||||
'1' Literal.Number
|
||||
' ' Text.Whitespace
|
||||
'then' Keyword
|
||||
' ' Text.Whitespace
|
||||
'-' Operator
|
||||
'1' Literal.Number
|
||||
' ' Text.Whitespace
|
||||
'else' Keyword
|
||||
' ' Text.Whitespace
|
||||
'0' Literal.Number
|
||||
' ' Text.Whitespace
|
||||
'fi' Keyword
|
||||
'\n' Text.Whitespace
|
@ -0,0 +1,6 @@
|
||||
---input---
|
||||
'a[3]:3'
|
||||
|
||||
---tokens---
|
||||
"'a[3]:3'" Literal.String.Interpol
|
||||
'\n' Text.Whitespace
|
@ -0,0 +1,6 @@
|
||||
---input---
|
||||
'a.a:3'
|
||||
|
||||
---tokens---
|
||||
"'a.a:3'" Literal.String.Interpol
|
||||
'\n' Text.Whitespace
|
6
tests/praat/test_interpolated_numeric_hash.txt
Normal file
6
tests/praat/test_interpolated_numeric_hash.txt
Normal file
@ -0,0 +1,6 @@
|
||||
---input---
|
||||
'a["b"]'
|
||||
|
||||
---tokens---
|
||||
'\'a["b"]\'' Literal.String.Interpol
|
||||
'\n' Text.Whitespace
|
6
tests/praat/test_interpolated_numeric_indexed.txt
Normal file
6
tests/praat/test_interpolated_numeric_indexed.txt
Normal file
@ -0,0 +1,6 @@
|
||||
---input---
|
||||
'a[3]'
|
||||
|
||||
---tokens---
|
||||
"'a[3]'" Literal.String.Interpol
|
||||
'\n' Text.Whitespace
|
6
tests/praat/test_interpolated_numeric_with_precision.txt
Normal file
6
tests/praat/test_interpolated_numeric_with_precision.txt
Normal file
@ -0,0 +1,6 @@
|
||||
---input---
|
||||
'a:3'
|
||||
|
||||
---tokens---
|
||||
"'a:3'" Literal.String.Interpol
|
||||
'\n' Text.Whitespace
|
6
tests/praat/test_interpolated_string_hash.txt
Normal file
6
tests/praat/test_interpolated_string_hash.txt
Normal file
@ -0,0 +1,6 @@
|
||||
---input---
|
||||
'a$["b"]'
|
||||
|
||||
---tokens---
|
||||
'\'a$["b"]\'' Literal.String.Interpol
|
||||
'\n' Text.Whitespace
|
6
tests/praat/test_interpolated_string_indexed.txt
Normal file
6
tests/praat/test_interpolated_string_indexed.txt
Normal file
@ -0,0 +1,6 @@
|
||||
---input---
|
||||
'a$[3]'
|
||||
|
||||
---tokens---
|
||||
"'a$[3]'" Literal.String.Interpol
|
||||
'\n' Text.Whitespace
|
14
tests/praat/test_interpolation_boundary.txt
Normal file
14
tests/praat/test_interpolation_boundary.txt
Normal file
@ -0,0 +1,14 @@
|
||||
---input---
|
||||
"'" + "'"
|
||||
|
||||
---tokens---
|
||||
'"' Literal.String
|
||||
"'" Literal.String
|
||||
'"' Literal.String
|
||||
' ' Text.Whitespace
|
||||
'+' Operator
|
||||
' ' Text.Whitespace
|
||||
'"' Literal.String
|
||||
"'" Literal.String
|
||||
'"' Literal.String
|
||||
'\n' Text.Whitespace
|
11
tests/praat/test_numeric_assignment.txt
Normal file
11
tests/praat/test_numeric_assignment.txt
Normal file
@ -0,0 +1,11 @@
|
||||
---input---
|
||||
var = -15e4
|
||||
|
||||
---tokens---
|
||||
'var' Text
|
||||
' ' Text.Whitespace
|
||||
'=' Operator
|
||||
' ' Text.Whitespace
|
||||
'-' Operator
|
||||
'15e4' Literal.Number
|
||||
'\n' Text.Whitespace
|
12
tests/praat/test_string_assignment.txt
Normal file
12
tests/praat/test_string_assignment.txt
Normal file
@ -0,0 +1,12 @@
|
||||
---input---
|
||||
var$ = "foo"
|
||||
|
||||
---tokens---
|
||||
'var$' Text
|
||||
' ' Text.Whitespace
|
||||
'=' Operator
|
||||
' ' Text.Whitespace
|
||||
'"' Literal.String
|
||||
'foo' Literal.String
|
||||
'"' Literal.String
|
||||
'\n' Text.Whitespace
|
13
tests/praat/test_string_escaped_quotes.txt
Normal file
13
tests/praat/test_string_escaped_quotes.txt
Normal file
@ -0,0 +1,13 @@
|
||||
---input---
|
||||
"it said ""foo"""
|
||||
|
||||
---tokens---
|
||||
'"' Literal.String
|
||||
'it said ' Literal.String
|
||||
'"' Literal.String
|
||||
'"' Literal.String
|
||||
'foo' Literal.String
|
||||
'"' Literal.String
|
||||
'"' Literal.String
|
||||
'"' Literal.String
|
||||
'\n' Text.Whitespace
|
Reference in New Issue
Block a user