summaryrefslogtreecommitdiff
path: root/tests/lexers/rb/example4.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/rb/example4.txt
parentf0445be718da83541ea3401aad882f3937147263 (diff)
downloadpygments-git-examplefiles.tar.gz
Move test_examplefiles to new tests/lexers scheme.examplefiles
Diffstat (limited to 'tests/lexers/rb/example4.txt')
-rw-r--r--tests/lexers/rb/example4.txt161
1 files changed, 161 insertions, 0 deletions
diff --git a/tests/lexers/rb/example4.txt b/tests/lexers/rb/example4.txt
new file mode 100644
index 00000000..059c5d17
--- /dev/null
+++ b/tests/lexers/rb/example4.txt
@@ -0,0 +1,161 @@
+---input---
+/
+this is a
+multiline
+regex
+/
+
+this /is a
+multiline regex too/
+
+foo = /is also
+one/
+
+also /4
+is one/
+
+this(/
+too
+/)
+
+# this not
+2 /4
+asfsadf/
+
+# this is also not one
+0x4d /25
+foo/
+
+42 and /this
+is also a multiline
+regex/
+
+
+# And here some special string cases
+foo = % blah # comment here to ensure whitespace
+foo(% blah )
+foo << % blah # stupid but has to work
+foo = % blah + % blub # wicked
+foo = %q wicked # works too
+
+---tokens---
+'/' Literal.String.Regex
+'\nthis is a\nmultiline\nregex\n' Literal.String.Regex
+
+'/' Literal.String.Regex
+'\n\n' Text
+
+'this' Name
+' ' Text
+'/' Literal.String.Regex
+'is a\nmultiline regex too' Literal.String.Regex
+'/' Literal.String.Regex
+'\n\n' Text
+
+'foo' Name
+' ' Text
+'=' Operator
+' ' Text
+'/' Literal.String.Regex
+'is also\none' Literal.String.Regex
+'/' Literal.String.Regex
+'\n\n' Text
+
+'also' Name
+' ' Text
+'/' Literal.String.Regex
+'4\nis one' Literal.String.Regex
+'/' Literal.String.Regex
+'\n\n' Text
+
+'this' Name
+'(' Punctuation
+'/' Literal.String.Regex
+'\ntoo\n' Literal.String.Regex
+
+'/' Literal.String.Regex
+')' Punctuation
+'\n\n' Text
+
+'# this not' Comment.Single
+'\n' Text
+
+'2' Literal.Number.Integer
+' ' Text
+'/' Operator
+'4' Literal.Number.Integer
+'\n' Text
+
+'asfsadf' Name
+'/' Operator
+'\n\n' Text
+
+'# this is also not one' Comment.Single
+'\n' Text
+
+'0x4d' Literal.Number.Hex
+' ' Text
+'/' Operator
+'25' Literal.Number.Integer
+'\n' Text
+
+'foo' Name
+'/' Operator
+'\n\n' Text
+
+'42' Literal.Number.Integer
+' ' Text
+'and' Operator.Word
+' ' Text
+'/' Literal.String.Regex
+'this\nis also a multiline\nregex' Literal.String.Regex
+'/' Literal.String.Regex
+'\n\n\n' Text
+
+'# And here some special string cases' Comment.Single
+'\n' Text
+
+'foo' Name
+' ' Text
+'=' Operator
+' ' Text
+'% blah ' Literal.String.Other
+' ' Text
+'# comment here to ensure whitespace' Comment.Single
+'\n' Text
+
+'foo' Name
+'(' Punctuation
+'% blah ' Literal.String.Other
+')' Punctuation
+'\n' Text
+
+'foo' Name
+' ' Text
+'<<' Operator
+' ' Text
+'% blah ' Literal.String.Other
+' ' Text
+'# stupid but has to work' Comment.Single
+'\n' Text
+
+'foo' Name
+' ' Text
+'=' Operator
+' ' Text
+'% blah ' Literal.String.Other
+'+' Operator
+' ' Text
+'% blub ' Literal.String.Other
+' ' Text
+'# wicked' Comment.Single
+'\n' Text
+
+'foo' Name
+' ' Text
+'=' Operator
+' ' Text
+'%q wicked ' Literal.String.Other
+' ' Text
+'# works too' Comment.Single
+'\n' Text