summaryrefslogtreecommitdiff
path: root/tests/lexers/evoque/example.txt
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2021-01-18 21:24:00 +0100
committerGeorg Brandl <georg@python.org>2021-01-18 22:08:36 +0100
commit2a3d3a7d5b9c60dedf6638d876161d9563faebcf (patch)
tree809c0b4a686db98f5954afa1944404cd9652c6b2 /tests/lexers/evoque/example.txt
parentf0445be718da83541ea3401aad882f3937147263 (diff)
downloadpygments-git-examplefiles.tar.gz
Move test_examplefiles to new tests/lexers scheme.examplefiles
Diffstat (limited to 'tests/lexers/evoque/example.txt')
-rw-r--r--tests/lexers/evoque/example.txt325
1 files changed, 325 insertions, 0 deletions
diff --git a/tests/lexers/evoque/example.txt b/tests/lexers/evoque/example.txt
new file mode 100644
index 00000000..7adc8121
--- /dev/null
+++ b/tests/lexers/evoque/example.txt
@@ -0,0 +1,325 @@
+---input---
+$overlay{name=site_base}
+
+$begin{table_row}
+ $for{ col in row }
+ <td>${col}</td>\
+ $else
+ <td class="empty" colspan="7">empty row</td>
+ $rof
+$end{table_row}
+
+<table>
+ $for{ i, row in enumerate(rows) }
+ <tr$if{i%2} class="odd"$fi> #[ "odd" rows get a special style ]#
+ $evoque{#table_row}
+ $evoque{
+ #table_row
+ }
+ $evoque{'#table_row'}
+ $evoque{ '#table_row', collection=None, quoting="str"}
+ $evoque{name="#table_row"}
+ $evoque{name=var_table_row}
+ $evoque{%#table_row%}
+ $evoque{% #table_row %}
+ </tr>
+ $rof
+</table>
+
+$evoque{disclaimer, collection="legals"}
+$evoque{ disclaimer , collection="legals", abc=123}
+$evoque{% disclaimer, collection="legals"%}
+
+$test{% site_base="site.html",
+ rows=[("a", "b", 3.0, {"one":1}, "<escape-me/>", "i", "j")] %}
+
+---tokens---
+'$' Punctuation
+'overlay' Name.Builtin
+'{' Punctuation
+'name' Literal.String
+'=' Operator
+'site_base' Name
+'}' Punctuation
+'\n\n' Other
+
+'$' Punctuation
+'begin' Name.Builtin
+'{' Punctuation
+'table_row' Literal.String
+'}' Punctuation
+'\n ' Other
+'$' Punctuation
+'for' Name.Builtin
+'{' Punctuation
+' ' Text
+'col' Name
+' ' Text
+'in' Operator.Word
+' ' Text
+'row' Name
+' ' Text
+'}' Punctuation
+'\n <td>' Other
+'${' Punctuation
+'col' Name
+'}' Punctuation
+'</td>\\\n ' Other
+'$' Punctuation
+'else' Name.Builtin
+'\n <td class="empty" colspan="7">empty row</td>\n ' Other
+'$' Punctuation
+'rof' Name.Builtin
+'\n' Other
+
+'$' Punctuation
+'end' Name.Builtin
+'{' Punctuation
+'table_row' Literal.String
+'}' Punctuation
+'\n\n<table>\n ' Other
+'$' Punctuation
+'for' Name.Builtin
+'{' Punctuation
+' ' Text
+'i' Name
+',' Punctuation
+' ' Text
+'row' Name
+' ' Text
+'in' Operator.Word
+' ' Text
+'enumerate' Name.Builtin
+'(' Punctuation
+'rows' Name
+')' Punctuation
+' ' Text
+'}' Punctuation
+'\n <tr' Other
+'$' Punctuation
+'if' Name.Builtin
+'{' Punctuation
+'i' Name
+'%' Operator
+'2' Literal.Number.Integer
+'}' Punctuation
+' class="odd"' Other
+'$' Punctuation
+'fi' Name.Builtin
+'> ' Other
+'#[' Comment.Multiline
+' ' Comment.Multiline
+'"' Comment.Multiline
+'o' Comment.Multiline
+'d' Comment.Multiline
+'d' Comment.Multiline
+'"' Comment.Multiline
+' ' Comment.Multiline
+'r' Comment.Multiline
+'o' Comment.Multiline
+'w' Comment.Multiline
+'s' Comment.Multiline
+' ' Comment.Multiline
+'g' Comment.Multiline
+'e' Comment.Multiline
+'t' Comment.Multiline
+' ' Comment.Multiline
+'a' Comment.Multiline
+' ' Comment.Multiline
+'s' Comment.Multiline
+'p' Comment.Multiline
+'e' Comment.Multiline
+'c' Comment.Multiline
+'i' Comment.Multiline
+'a' Comment.Multiline
+'l' Comment.Multiline
+' ' Comment.Multiline
+'s' Comment.Multiline
+'t' Comment.Multiline
+'y' Comment.Multiline
+'l' Comment.Multiline
+'e' Comment.Multiline
+' ' Comment.Multiline
+']#' Comment.Multiline
+'\n ' Other
+'$' Punctuation
+'evoque' Name.Builtin
+'{' Punctuation
+'#table_row' Literal.String
+'}' Punctuation
+'\n ' Other
+'$' Punctuation
+'evoque' Name.Builtin
+'{' Punctuation
+' \n #table_row' Literal.String
+' ' Text
+'\n' Text
+
+' ' Text
+'}' Punctuation
+'\n ' Other
+'$' Punctuation
+'evoque' Name.Builtin
+'{' Punctuation
+"'#table_row'" Literal.String
+'}' Punctuation
+'\n ' Other
+'$' Punctuation
+'evoque' Name.Builtin
+'{' Punctuation
+" '#table_row'" Literal.String
+',' Punctuation
+' ' Text
+'collection' Name
+'=' Operator
+'None' Keyword.Constant
+',' Punctuation
+' ' Text
+'quoting' Name
+'=' Operator
+'"' Literal.String.Double
+'str' Literal.String.Double
+'"' Literal.String.Double
+'}' Punctuation
+'\n ' Other
+'$' Punctuation
+'evoque' Name.Builtin
+'{' Punctuation
+'name' Literal.String
+'=' Operator
+'"' Literal.String.Double
+'#table_row' Literal.String.Double
+'"' Literal.String.Double
+'}' Punctuation
+'\n ' Other
+'$' Punctuation
+'evoque' Name.Builtin
+'{' Punctuation
+'name' Literal.String
+'=' Operator
+'var_table_row' Name
+'}' Punctuation
+'\n ' Other
+'$' Punctuation
+'evoque' Name.Builtin
+'{%' Punctuation
+'#table_row' Literal.String
+'%}' Punctuation
+'\n ' Other
+'$' Punctuation
+'evoque' Name.Builtin
+'{%' Punctuation
+' #table_row' Literal.String
+' ' Text
+'%}' Punctuation
+'\n </tr>\n ' Other
+'$' Punctuation
+'rof' Name.Builtin
+'\n</table>\n\n' Other
+
+'$' Punctuation
+'evoque' Name.Builtin
+'{' Punctuation
+'disclaimer' Literal.String
+',' Punctuation
+' ' Text
+'collection' Name
+'=' Operator
+'"' Literal.String.Double
+'legals' Literal.String.Double
+'"' Literal.String.Double
+'}' Punctuation
+'\n' Other
+
+'$' Punctuation
+'evoque' Name.Builtin
+'{' Punctuation
+' disclaimer' Literal.String
+' ' Text
+',' Punctuation
+' ' Text
+'collection' Name
+'=' Operator
+'"' Literal.String.Double
+'legals' Literal.String.Double
+'"' Literal.String.Double
+',' Punctuation
+' ' Text
+'abc' Name
+'=' Operator
+'123' Literal.Number.Integer
+'}' Punctuation
+'\n' Other
+
+'$' Punctuation
+'evoque' Name.Builtin
+'{%' Punctuation
+' disclaimer' Literal.String
+',' Punctuation
+' ' Text
+'collection' Name
+'=' Operator
+'"' Literal.String.Double
+'legals' Literal.String.Double
+'"' Literal.String.Double
+'%}' Punctuation
+'\n\n' Other
+
+'$' Punctuation
+'test' Name.Builtin
+'{%' Punctuation
+' ' Text
+'site_base' Name
+'=' Operator
+'"' Literal.String.Double
+'site.html' Literal.String.Double
+'"' Literal.String.Double
+',' Punctuation
+' ' Text
+'\n' Text
+
+' ' Text
+'rows' Name
+'=' Operator
+'[' Punctuation
+'(' Punctuation
+'"' Literal.String.Double
+'a' Literal.String.Double
+'"' Literal.String.Double
+',' Punctuation
+' ' Text
+'"' Literal.String.Double
+'b' Literal.String.Double
+'"' Literal.String.Double
+',' Punctuation
+' ' Text
+'3.0' Literal.Number.Float
+',' Punctuation
+' ' Text
+'{' Punctuation
+'"' Literal.String.Double
+'one' Literal.String.Double
+'"' Literal.String.Double
+':' Punctuation
+'1' Literal.Number.Integer
+'}' Punctuation
+',' Punctuation
+' ' Text
+'"' Literal.String.Double
+'<escape-me/>' Literal.String.Double
+'"' Literal.String.Double
+',' Punctuation
+' ' Text
+'"' Literal.String.Double
+'i' Literal.String.Double
+'"' Literal.String.Double
+',' Punctuation
+' ' Text
+'"' Literal.String.Double
+'j' Literal.String.Double
+'"' Literal.String.Double
+')' Punctuation
+']' Punctuation
+' ' Text
+'%}' Punctuation
+'\n' Other