mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 22:53:05 -03:00
Reorganize tests into a real spec suite
This commit is contained in:
28
spec/tests/php/anonymous_class.txt
Normal file
28
spec/tests/php/anonymous_class.txt
Normal file
@ -0,0 +1,28 @@
|
||||
---input---
|
||||
<?php
|
||||
$containerObject = new class {
|
||||
public $something;
|
||||
}
|
||||
|
||||
---tokens---
|
||||
'<?php' Comment.Preproc
|
||||
'\n' Text
|
||||
|
||||
'$containerObject' Name.Variable
|
||||
' ' Text
|
||||
'=' Operator
|
||||
' ' Text
|
||||
'new' Keyword
|
||||
' ' Text
|
||||
'class' Keyword
|
||||
' ' Text
|
||||
'{' Punctuation
|
||||
'\n ' Text
|
||||
'public' Keyword
|
||||
' ' Text
|
||||
'$something' Name.Variable
|
||||
';' Punctuation
|
||||
'\n' Text
|
||||
|
||||
'}' Punctuation
|
||||
'\n' Text
|
38
spec/tests/php/attributes.txt
Normal file
38
spec/tests/php/attributes.txt
Normal file
@ -0,0 +1,38 @@
|
||||
---input---
|
||||
<?php
|
||||
#[Attribute]
|
||||
#[Attribute(true)]
|
||||
#[Attribute, Attribute]
|
||||
class Extra {}
|
||||
|
||||
---tokens---
|
||||
'<?php' Comment.Preproc
|
||||
'\n' Text
|
||||
|
||||
'#[' Punctuation
|
||||
'Attribute' Name.Decorator
|
||||
']' Punctuation
|
||||
'\n' Text
|
||||
|
||||
'#[' Punctuation
|
||||
'Attribute' Name.Decorator
|
||||
'(' Punctuation
|
||||
'true' Keyword
|
||||
')' Punctuation
|
||||
']' Punctuation
|
||||
'\n' Text
|
||||
|
||||
'#[' Punctuation
|
||||
'Attribute' Name.Decorator
|
||||
',' Punctuation
|
||||
' ' Text
|
||||
'Attribute' Name.Decorator
|
||||
']' Punctuation
|
||||
'\n' Text
|
||||
|
||||
'class' Keyword
|
||||
' ' Text
|
||||
'Extra' Name.Class
|
||||
' ' Text
|
||||
'{}' Punctuation
|
||||
'\n' Text
|
28
spec/tests/php/test_backslashes_in_strings.txt
Normal file
28
spec/tests/php/test_backslashes_in_strings.txt
Normal file
@ -0,0 +1,28 @@
|
||||
---input---
|
||||
<?php
|
||||
$pipe = popen( "flamegraph.pl --title=\"$title\" > /var/www/html/w/docs/flamegraph.svg", 'w' );
|
||||
|
||||
---tokens---
|
||||
'<?php' Comment.Preproc
|
||||
'\n' Text
|
||||
|
||||
'$pipe' Name.Variable
|
||||
' ' Text
|
||||
'=' Operator
|
||||
' ' Text
|
||||
'popen' Name.Builtin
|
||||
'(' Punctuation
|
||||
' ' Text
|
||||
'"' Literal.String.Double
|
||||
'flamegraph.pl --title=' Literal.String.Double
|
||||
'\\"' Literal.String.Escape
|
||||
'$title' Literal.String.Interpol
|
||||
'\\"' Literal.String.Escape
|
||||
' > /var/www/html/w/docs/flamegraph.svg' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
',' Punctuation
|
||||
' ' Text
|
||||
"'w'" Literal.String.Single
|
||||
' ' Text
|
||||
');' Punctuation
|
||||
'\n' Text
|
16
spec/tests/php/test_string_escaping_run.txt
Normal file
16
spec/tests/php/test_string_escaping_run.txt
Normal file
@ -0,0 +1,16 @@
|
||||
---input---
|
||||
<?php $x="{\""; ?>
|
||||
|
||||
---tokens---
|
||||
'<?php' Comment.Preproc
|
||||
' ' Text
|
||||
'$x' Name.Variable
|
||||
'=' Operator
|
||||
'"' Literal.String.Double
|
||||
'{' Literal.String.Double
|
||||
'\\"' Literal.String.Escape
|
||||
'"' Literal.String.Double
|
||||
';' Punctuation
|
||||
' ' Text
|
||||
'?>' Comment.Preproc
|
||||
'\n' Other
|
45
spec/tests/php/variable_variable.txt
Normal file
45
spec/tests/php/variable_variable.txt
Normal file
@ -0,0 +1,45 @@
|
||||
---input---
|
||||
<?php
|
||||
${'whatever'} = '';
|
||||
${$whatever} = '';
|
||||
${${'whatever' . 'whatever'}} = '';
|
||||
|
||||
---tokens---
|
||||
'<?php' Comment.Preproc
|
||||
'\n' Text
|
||||
|
||||
'${' Name.Variable
|
||||
"'whatever'" Literal.String.Single
|
||||
'}' Name.Variable
|
||||
' ' Text
|
||||
'=' Operator
|
||||
' ' Text
|
||||
"''" Literal.String.Single
|
||||
';' Punctuation
|
||||
'\n' Text
|
||||
|
||||
'${' Name.Variable
|
||||
'$whatever' Name.Variable
|
||||
'}' Name.Variable
|
||||
' ' Text
|
||||
'=' Operator
|
||||
' ' Text
|
||||
"''" Literal.String.Single
|
||||
';' Punctuation
|
||||
'\n' Text
|
||||
|
||||
'${' Name.Variable
|
||||
'${' Name.Variable
|
||||
"'whatever'" Literal.String.Single
|
||||
' ' Text
|
||||
'.' Operator
|
||||
' ' Text
|
||||
"'whatever'" Literal.String.Single
|
||||
'}' Name.Variable
|
||||
'}' Name.Variable
|
||||
' ' Text
|
||||
'=' Operator
|
||||
' ' Text
|
||||
"''" Literal.String.Single
|
||||
';' Punctuation
|
||||
'\n' Text
|
Reference in New Issue
Block a user