Imported test cases from pygments

This commit is contained in:
2024-08-03 07:36:47 -03:00
parent c9df4be879
commit 99e1e2b0cb
692 changed files with 37403 additions and 0 deletions

29
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

28
tests/html/javascript.txt Normal file
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