summaryrefslogtreecommitdiff
path: root/tests/lexers/pycon/example2.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/pycon/example2.txt
parentf0445be718da83541ea3401aad882f3937147263 (diff)
downloadpygments-git-examplefiles.tar.gz
Move test_examplefiles to new tests/lexers scheme.examplefiles
Diffstat (limited to 'tests/lexers/pycon/example2.txt')
-rw-r--r--tests/lexers/pycon/example2.txt83
1 files changed, 83 insertions, 0 deletions
diff --git a/tests/lexers/pycon/example2.txt b/tests/lexers/pycon/example2.txt
new file mode 100644
index 00000000..3df988a2
--- /dev/null
+++ b/tests/lexers/pycon/example2.txt
@@ -0,0 +1,83 @@
+---input---
+>>> :
+ File "<stdin>", line 1
+ :
+ ^
+SyntaxError: invalid syntax
+>>>
+KeyboardInterrupt
+>>>
+
+>>> 1/0
+Traceback (most recent call last):
+ ...
+ZeroDivisionError
+
+>>> 1/0 # this used to swallow the traceback
+Traceback (most recent call last):
+ ...
+
+---tokens---
+'>>> ' Generic.Prompt
+':' Punctuation
+'\n' Text
+
+'' Generic.Traceback
+' File ' Text
+'"<stdin>"' Name.Builtin
+', line ' Text
+'1' Literal.Number
+'\n' Text
+
+' ' Text
+':' Punctuation
+'\n' Text
+
+' ' Text
+'^' Operator
+'\n' Text
+
+'SyntaxError' Generic.Error
+': ' Text
+'invalid syntax' Name
+'\n' Text
+
+'>>> ' Generic.Prompt
+'\n' Text
+
+'KeyboardInterrupt\n' Name.Class
+
+'>>>\n' Generic.Output
+
+'\n' Generic.Output
+
+'>>> ' Generic.Prompt
+'1' Literal.Number.Integer
+'/' Operator
+'0' Literal.Number.Integer
+'\n' Text
+
+'Traceback (most recent call last):\n' Generic.Traceback
+
+' ' Text
+'...' Comment
+'\n' Text
+
+'ZeroDivisionError' Generic.Error
+'\n' Text
+
+'\n' Generic.Output
+
+'>>> ' Generic.Prompt
+'1' Literal.Number.Integer
+'/' Operator
+'0' Literal.Number.Integer
+' ' Text
+'# this used to swallow the traceback' Comment.Single
+'\n' Text
+
+'Traceback (most recent call last):\n' Generic.Traceback
+
+' ' Text
+'...' Comment
+'\n' Text