summaryrefslogtreecommitdiff
path: root/ext/ply/test/lex_token2.py
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ply/test/lex_token2.py')
-rw-r--r--ext/ply/test/lex_token2.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/ply/test/lex_token2.py b/ext/ply/test/lex_token2.py
new file mode 100644
index 000000000..38b34dabe
--- /dev/null
+++ b/ext/ply/test/lex_token2.py
@@ -0,0 +1,21 @@
+# lex_token.py
+#
+# Tests for tokens of wrong type
+
+import lex
+
+tokens = "PLUS MINUS NUMBER"
+
+t_PLUS = r'\+'
+t_MINUS = r'-'
+t_NUMBER = r'\d+'
+
+def t_error(t):
+ pass
+
+import sys
+sys.tracebacklimit = 0
+
+lex.lex()
+
+