From 19aa4cbddfaa4f776d6899349a09e362d6dbb7b9 Mon Sep 17 00:00:00 2001 From: David Beazley Date: Thu, 19 Apr 2012 08:46:21 -0500 Subject: New test added. --- test/testyacc.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/testyacc.py b/test/testyacc.py index 2b06b44..cd2ab03 100644 --- a/test/testyacc.py +++ b/test/testyacc.py @@ -172,7 +172,18 @@ class YaccErrorWarningTests(unittest.TestCase): self.assert_(check_expected(result, "yacc_error4.py:62: Illegal rule name 'error'. Already defined as a token\n" )) - + + + def test_yacc_error5(self): + run_import("yacc_error5") + result = sys.stdout.getvalue() + self.assert_(check_expected(result, + "Group at 3:10 to 3:12\n" + "Syntax error at 'b'\n" + "Syntax error at 4:18 to 4:22\n" + "Assignment Error at 2:5 to 5:33\n" + )) + def test_yacc_inf(self): self.assertRaises(ply.yacc.YaccError,run_import,"yacc_inf") result = sys.stderr.getvalue() -- cgit v1.2.1