summaryrefslogtreecommitdiff
path: root/ext/ply/test/lex_nowarn.py
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ply/test/lex_nowarn.py')
-rw-r--r--ext/ply/test/lex_nowarn.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/ext/ply/test/lex_nowarn.py b/ext/ply/test/lex_nowarn.py
new file mode 100644
index 000000000..d60d31c53
--- /dev/null
+++ b/ext/ply/test/lex_nowarn.py
@@ -0,0 +1,30 @@
+# lex_token.py
+#
+# Missing t_error() rule
+
+import sys
+sys.path.insert(0,"..")
+
+import ply.lex as lex
+
+tokens = [
+ "PLUS",
+ "MINUS",
+ "NUMBER",
+ "NUMBER",
+ ]
+
+states = (('foo','exclusive'),)
+
+t_ignore = ' \t'
+t_PLUS = r'\+'
+t_MINUS = r'-'
+t_NUMBER = r'\d+'
+
+t_foo_NUMBER = r'\d+'
+
+sys.tracebacklimit = 0
+
+lex.lex(nowarn=1)
+
+