summaryrefslogtreecommitdiff
path: root/tests/examplefiles/css
diff options
context:
space:
mode:
authorOleh Prypin <oleh@pryp.in>2021-01-20 10:48:45 +0100
committerGitHub <noreply@github.com>2021-01-20 10:48:45 +0100
commit6f4309217326430145564ae8b1bb393ea684f39f (patch)
treebf4025a5e709426dc927c4afc4fd2286f8450ed9 /tests/examplefiles/css
parentf0445be718da83541ea3401aad882f3937147263 (diff)
downloadpygments-git-6f4309217326430145564ae8b1bb393ea684f39f.tar.gz
Also add auto-updatable output-based tests to examplefiles (#1689)
Co-authored-by: Georg Brandl <georg@python.org>
Diffstat (limited to 'tests/examplefiles/css')
-rw-r--r--tests/examplefiles/css/test.css54
-rw-r--r--tests/examplefiles/css/test.css.output357
-rw-r--r--tests/examplefiles/css/webkit-transition.css3
-rw-r--r--tests/examplefiles/css/webkit-transition.css.output19
4 files changed, 433 insertions, 0 deletions
diff --git a/tests/examplefiles/css/test.css b/tests/examplefiles/css/test.css
new file mode 100644
index 00000000..3f9ffb20
--- /dev/null
+++ b/tests/examplefiles/css/test.css
@@ -0,0 +1,54 @@
+body {
+ font-size: 12pt;
+ background: #fff url(temp.png) top left no-repeat;
+}
+
+* html body {
+ font-size: 14pt;
+}
+
+#nav .new {
+ display: block;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ -ms-border-radius: 5px;
+ -o-border-radius: 5px;
+ border-radius: 5px;
+}
+
+ul#nav li.new {
+ font-weight: bold;
+}
+
+:link {
+ color: #f00;
+}
+
+:link:hover {
+ color: #0f0;
+}
+
+@media screen {
+ body {
+ background: #ccc;
+ }
+}
+
+@namespace "http://www.w3.org/1999/xhtml";
+
+@import url("mystyle.css");
+
+@charset "ISO-8859-1";
+
+@font-face { font-family: "Example Font"; src: url("http://www.example.com/fonts/example"); }
+
+@media screen { body { font-size: 16px } } @media print { body { font-size: 12pt } }
+
+
+@page { body { margin: 1in 1.5in; } }
+
+@page linke-seite:left { body { margin:20mm; margin-right:25mm; } }
+
+@-moz-document url-prefix(http://pygments.org) { a {font-style: normal !important;} }
+
+
diff --git a/tests/examplefiles/css/test.css.output b/tests/examplefiles/css/test.css.output
new file mode 100644
index 00000000..6e3768a9
--- /dev/null
+++ b/tests/examplefiles/css/test.css.output
@@ -0,0 +1,357 @@
+'body' Name.Tag
+' ' Text
+'{' Punctuation
+'\n ' Text
+'font-size' Keyword
+':' Punctuation
+' ' Text
+'12' Literal.Number.Integer
+'pt' Keyword.Type
+';' Punctuation
+'\n ' Text
+'background' Keyword
+':' Punctuation
+' ' Text
+'#fff' Literal.Number.Hex
+' ' Text
+'url' Name.Builtin
+'(' Punctuation
+'temp.png' Literal.String.Other
+')' Punctuation
+' ' Text
+'top' Keyword.Constant
+' ' Text
+'left' Keyword.Constant
+' ' Text
+'no-repeat' Keyword.Constant
+';' Punctuation
+'\n' Text
+
+'}' Punctuation
+'\n\n' Text
+
+'*' Operator
+' ' Text
+'html' Name.Tag
+' ' Text
+'body' Name.Tag
+' ' Text
+'{' Punctuation
+'\n ' Text
+'font-size' Keyword
+':' Punctuation
+' ' Text
+'14' Literal.Number.Integer
+'pt' Keyword.Type
+';' Punctuation
+'\n' Text
+
+'}' Punctuation
+'\n\n' Text
+
+'#' Punctuation
+'nav' Name.Namespace
+' ' Text
+'.' Punctuation
+'new' Name.Class
+' ' Text
+'{' Punctuation
+'\n ' Text
+'display' Keyword
+':' Punctuation
+' ' Text
+'block' Keyword.Constant
+';' Punctuation
+'\n ' Text
+'-webkit-' Keyword.Pseudo
+'border-radius' Keyword
+':' Punctuation
+' ' Text
+'5' Literal.Number.Integer
+'px' Keyword.Type
+';' Punctuation
+'\n ' Text
+'-moz-' Keyword.Pseudo
+'border-radius' Keyword
+':' Punctuation
+' ' Text
+'5' Literal.Number.Integer
+'px' Keyword.Type
+';' Punctuation
+'\n ' Text
+'-ms-' Keyword.Pseudo
+'border-radius' Keyword
+':' Punctuation
+' ' Text
+'5' Literal.Number.Integer
+'px' Keyword.Type
+';' Punctuation
+'\n ' Text
+'-o-' Keyword.Pseudo
+'border-radius' Keyword
+':' Punctuation
+' ' Text
+'5' Literal.Number.Integer
+'px' Keyword.Type
+';' Punctuation
+'\n ' Text
+'border-radius' Keyword
+':' Punctuation
+' ' Text
+'5' Literal.Number.Integer
+'px' Keyword.Type
+';' Punctuation
+'\n' Text
+
+'}' Punctuation
+'\n\n' Text
+
+'ul' Name.Tag
+'#' Punctuation
+'nav' Name.Namespace
+' ' Text
+'li' Name.Tag
+'.' Punctuation
+'new' Name.Class
+' ' Text
+'{' Punctuation
+'\n ' Text
+'font-weight' Keyword
+':' Punctuation
+' ' Text
+'bold' Keyword.Constant
+';' Punctuation
+'\n' Text
+
+'}' Punctuation
+'\n\n' Text
+
+':' Punctuation
+'link' Name.Decorator
+' ' Text
+'{' Punctuation
+'\n ' Text
+'color' Keyword
+':' Punctuation
+' ' Text
+'#f00' Literal.Number.Hex
+';' Punctuation
+'\n' Text
+
+'}' Punctuation
+'\n\n' Text
+
+':' Punctuation
+'link' Name.Decorator
+':' Punctuation
+'hover' Name.Decorator
+' ' Text
+'{' Punctuation
+'\n ' Text
+'color' Keyword
+':' Punctuation
+' ' Text
+'#0f0' Literal.Number.Hex
+';' Punctuation
+'\n' Text
+
+'}' Punctuation
+'\n\n' Text
+
+'@' Punctuation
+'media' Keyword
+' ' Text
+'screen' Name.Tag
+' ' Text
+'{' Punctuation
+'\n ' Text
+'body' Name.Tag
+' ' Text
+'{' Punctuation
+'\n ' Text
+'background' Keyword
+':' Punctuation
+' ' Text
+'#ccc' Literal.Number.Hex
+';' Punctuation
+'\n ' Text
+'}' Punctuation
+'\n' Text
+
+'}' Punctuation
+'\n\n' Text
+
+'@' Punctuation
+'namespace' Keyword
+' ' Text
+'"http://www.w3.org/1999/xhtml"' Literal.String.Double
+';' Punctuation
+'\n\n' Text
+
+'@' Punctuation
+'import' Keyword
+' ' Text
+'url' Name.Tag
+'(' Operator
+'"mystyle.css"' Literal.String.Double
+')' Operator
+';' Punctuation
+'\n\n' Text
+
+'@' Punctuation
+'charset' Keyword
+' ' Text
+'"ISO-8859-1"' Literal.String.Double
+';' Punctuation
+'\n\n' Text
+
+'@' Punctuation
+'font-face' Keyword
+' ' Text
+'{' Punctuation
+' ' Text
+'font-family' Name.Tag
+':' Operator
+' ' Text
+'"Example Font"' Literal.String.Double
+';' Operator
+' ' Text
+'src' Name.Tag
+':' Operator
+' ' Text
+'url' Name.Tag
+'(' Operator
+'"http://www.example.com/fonts/example"' Literal.String.Double
+')' Operator
+';' Operator
+' ' Text
+'}' Punctuation
+'\n\n' Text
+
+'@' Punctuation
+'media' Keyword
+' ' Text
+'screen' Name.Tag
+' ' Text
+'{' Punctuation
+' ' Text
+'body' Name.Tag
+' ' Text
+'{' Punctuation
+' ' Text
+'font-size' Keyword
+':' Punctuation
+' ' Text
+'16' Literal.Number.Integer
+'px' Keyword.Type
+' ' Text
+'}' Punctuation
+' ' Text
+'}' Punctuation
+' ' Text
+'@' Punctuation
+'media' Keyword
+' ' Text
+'print' Name.Tag
+' ' Text
+'{' Punctuation
+' ' Text
+'body' Name.Tag
+' ' Text
+'{' Punctuation
+' ' Text
+'font-size' Keyword
+':' Punctuation
+' ' Text
+'12' Literal.Number.Integer
+'pt' Keyword.Type
+' ' Text
+'}' Punctuation
+' ' Text
+'}' Punctuation
+'\n\n\n' Text
+
+'@' Punctuation
+'page' Keyword
+' ' Text
+'{' Punctuation
+' ' Text
+'body' Name.Tag
+' ' Text
+'{' Punctuation
+' ' Text
+'margin' Keyword
+':' Punctuation
+' ' Text
+'1' Literal.Number.Integer
+'in' Keyword.Type
+' ' Text
+'1.5' Literal.Number.Float
+'in' Keyword.Type
+';' Punctuation
+' ' Text
+'}' Punctuation
+' ' Text
+'}' Punctuation
+'\n\n' Text
+
+'@' Punctuation
+'page' Keyword
+' ' Text
+'linke-seite' Name.Tag
+':' Punctuation
+'left' Name.Decorator
+' ' Text
+'{' Punctuation
+' ' Text
+'body' Name.Tag
+' ' Text
+'{' Punctuation
+' ' Text
+'margin' Keyword
+':' Punctuation
+'20' Literal.Number.Integer
+'mm' Keyword.Type
+';' Punctuation
+' ' Text
+'margin-right' Keyword
+':' Punctuation
+'25' Literal.Number.Integer
+'mm' Keyword.Type
+';' Punctuation
+' ' Text
+'}' Punctuation
+' ' Text
+'}' Punctuation
+'\n\n' Text
+
+'@' Punctuation
+'-moz-document' Keyword
+' ' Text
+'url-prefix' Name.Tag
+'(' Operator
+'http' Name.Tag
+':' Operator
+'/' Operator
+'/' Operator
+'pygments' Name.Tag
+'.' Punctuation
+'org' Name.Class
+')' Operator
+' ' Text
+'{' Punctuation
+' ' Text
+'a' Name.Tag
+' ' Text
+'{' Punctuation
+'font-style' Keyword
+':' Punctuation
+' ' Text
+'normal' Keyword.Constant
+' ' Text
+'!important' Comment.Preproc
+';' Punctuation
+'}' Punctuation
+' ' Text
+'}' Punctuation
+'\n' Text
diff --git a/tests/examplefiles/css/webkit-transition.css b/tests/examplefiles/css/webkit-transition.css
new file mode 100644
index 00000000..a20b7112
--- /dev/null
+++ b/tests/examplefiles/css/webkit-transition.css
@@ -0,0 +1,3 @@
+p {
+ -webkit-transition: opacity 1s linear;
+}
diff --git a/tests/examplefiles/css/webkit-transition.css.output b/tests/examplefiles/css/webkit-transition.css.output
new file mode 100644
index 00000000..2e1f1f3b
--- /dev/null
+++ b/tests/examplefiles/css/webkit-transition.css.output
@@ -0,0 +1,19 @@
+'p' Name.Tag
+' ' Text
+'{' Punctuation
+'\n ' Text
+'-webkit-' Keyword.Pseudo
+'transition' Keyword
+':' Punctuation
+' ' Text
+'opacity' Keyword
+' ' Text
+'1' Literal.Number.Integer
+'s' Keyword.Type
+' ' Text
+'linear' Keyword.Constant
+';' Punctuation
+'\n' Text
+
+'}' Punctuation
+'\n' Text