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,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

View 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

View 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

View 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

View 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