summaryrefslogtreecommitdiff
path: root/tests/lexers/mathematica
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/mathematica
parentf0445be718da83541ea3401aad882f3937147263 (diff)
downloadpygments-git-examplefiles.tar.gz
Move test_examplefiles to new tests/lexers scheme.examplefiles
Diffstat (limited to 'tests/lexers/mathematica')
-rw-r--r--tests/lexers/mathematica/example.txt96
1 files changed, 96 insertions, 0 deletions
diff --git a/tests/lexers/mathematica/example.txt b/tests/lexers/mathematica/example.txt
new file mode 100644
index 00000000..fb6ce71c
--- /dev/null
+++ b/tests/lexers/mathematica/example.txt
@@ -0,0 +1,96 @@
+---input---
+1 + 1 (* This is a comment *)
+Global`
+SomeNamespace`Foo
+f[x_, y__, 3, z___] := tsneirsnteintie "fosrt" neisnrteiasrn
+E + 3
+Plus[1,Times[2,3]]
+Map[#1 + #2&, SomePairList]
+Plus[1.,-1,-1.,-1.0,]
+
+---tokens---
+'1' Literal.Number.Integer
+' ' Text.Whitespace
+'+' Operator
+' ' Text.Whitespace
+'1' Literal.Number.Integer
+' ' Text.Whitespace
+'(* This is a comment *)' Comment
+'\n' Text.Whitespace
+
+'Global`' Name.Namespace
+'\n' Text.Whitespace
+
+'SomeNamespace`' Name.Namespace
+'Foo' Name
+'\n' Text.Whitespace
+
+'f' Name
+'[' Punctuation
+'x_' Name.Variable
+',' Punctuation
+' ' Text.Whitespace
+'y__' Name.Variable
+',' Punctuation
+' ' Text.Whitespace
+'3' Literal.Number.Integer
+',' Punctuation
+' ' Text.Whitespace
+'z___' Name.Variable
+']' Punctuation
+' ' Text.Whitespace
+':=' Operator
+' ' Text.Whitespace
+'tsneirsnteintie' Name
+' ' Text.Whitespace
+'"fosrt"' Literal.String
+' ' Text.Whitespace
+'neisnrteiasrn' Name
+'\n' Text.Whitespace
+
+'E' Name
+' ' Text.Whitespace
+'+' Operator
+' ' Text.Whitespace
+'3' Literal.Number.Integer
+'\n' Text.Whitespace
+
+'Plus' Name
+'[' Punctuation
+'1' Literal.Number.Integer
+',' Punctuation
+'Times' Name
+'[' Punctuation
+'2' Literal.Number.Integer
+',' Punctuation
+'3' Literal.Number.Integer
+']' Punctuation
+']' Punctuation
+'\n' Text.Whitespace
+
+'Map' Name
+'[' Punctuation
+'#1' Name.Variable
+' ' Text.Whitespace
+'+' Operator
+' ' Text.Whitespace
+'#2' Name.Variable
+'&' Operator
+',' Punctuation
+' ' Text.Whitespace
+'SomePairList' Name
+']' Punctuation
+'\n' Text.Whitespace
+
+'Plus' Name
+'[' Punctuation
+'1.' Literal.Number.Float
+',' Punctuation
+'-1' Literal.Number.Integer
+',' Punctuation
+'-1.' Literal.Number.Float
+',' Punctuation
+'-1.0' Literal.Number.Float
+',' Punctuation
+']' Punctuation
+'\n' Text.Whitespace