mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 06:33:06 -03:00
Reorganize tests into a real spec suite
This commit is contained in:
29
spec/tests/html/css.txt
Normal file
29
spec/tests/html/css.txt
Normal 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
|
93
spec/tests/html/css_backtracking.txt
Normal file
93
spec/tests/html/css_backtracking.txt
Normal 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
spec/tests/html/javascript.txt
Normal file
28
spec/tests/html/javascript.txt
Normal 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
|
285
spec/tests/html/javascript_backtracking.txt
Normal file
285
spec/tests/html/javascript_backtracking.txt
Normal 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
|
40
spec/tests/html/javascript_unclosed.txt
Normal file
40
spec/tests/html/javascript_unclosed.txt
Normal 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
|
@ -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
|
Reference in New Issue
Block a user