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

29
spec/tests/html/css.txt Normal file
View File

@ -0,0 +1,29 @@
---input---
<style>
.ui-helper-hidden { display: none }
</style>
---tokens---
'<' Punctuation
'style' Name.Tag
'>' Punctuation
'\n' Text.Whitespace
'.' Punctuation
'ui-helper-hidden' Name.Class
' ' Text.Whitespace
'{' Punctuation
' ' Text.Whitespace
'display' Keyword
':' Punctuation
' ' Text.Whitespace
'none' Keyword.Constant
' ' Text.Whitespace
'}' Punctuation
'\n' Text.Whitespace
'<' Punctuation
'/' Punctuation
'style' Name.Tag
'>' Punctuation
'\n' Text

View File

@ -0,0 +1,93 @@
---input---
<style>
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
.ui-helper-hidden { display: none }
---tokens---
'<' Punctuation
'style' Name.Tag
'>' Punctuation
'\n' Text.Whitespace
'.' Punctuation
'ui-helper-hidden' Name.Class
' ' Text.Whitespace
'{' Punctuation
' ' Text.Whitespace
'display' Keyword
':' Punctuation
' ' Text.Whitespace
'none' Keyword.Constant
' ' Text.Whitespace
'}' Punctuation
'\n' Text.Whitespace
'.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n.ui-helper-hidden { display: none }\n' Text

View File

@ -0,0 +1,28 @@
---input---
<script type="text/javascript">
alert("hi");
</script>
---tokens---
'<' Punctuation
'script' Name.Tag
' ' Text
'type' Name.Attribute
'=' Operator
'"text/javascript"' Literal.String
'>' Punctuation
'' Text
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'<' Punctuation
'/' Punctuation
'script' Name.Tag
'>' Punctuation
'\n' Text

View File

@ -0,0 +1,285 @@
---input---
<script type="text/javascript">
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
alert("hi");
// Note the missing </script> tag; this should not cause catastrophic backtracking
---tokens---
'<' Punctuation
'script' Name.Tag
' ' Text
'type' Name.Attribute
'=' Operator
'"text/javascript"' Literal.String
'>' Punctuation
'' Text
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'// Note the missing ' Comment.Single
'<' Punctuation
'/' Punctuation
'script' Name.Tag
'>' Punctuation
' tag; this should not cause catastrophic backtracking\n' Text

View File

@ -0,0 +1,40 @@
---input---
<script type="text/javascript">
alert("hi");
alert("hi");
alert("hi");
alert("hi");
<div>
hi
</div>
---tokens---
'<' Punctuation
'script' Name.Tag
' ' Text
'type' Name.Attribute
'=' Operator
'"text/javascript"' Literal.String
'>' Punctuation
'' Text
'\n' Text.Whitespace
'alert' Name.Other
'(' Punctuation
'"hi"' Literal.String.Double
')' Punctuation
';' Punctuation
'\n' Text.Whitespace
'alert("hi");\nalert("hi");\nalert("hi");\n' Text
'<' Punctuation
'div' Name.Tag
'>' Punctuation
'\nhi\n' Text
'<' Punctuation
'/' Punctuation
'div' Name.Tag
'>' Punctuation
'\n' Text

View File

@ -0,0 +1,34 @@
---input---
<!--
this
comment
is
never
terminated
...
...
---tokens---
'<' Error
'!--\nthis\ncomment\nis\nnever\nterminated\n...\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n...\n' Text