From 489c69f8e1c15c75461d24d91aa3e9c2a756e807 Mon Sep 17 00:00:00 2001 From: "Kevin (Kun) \"Kassimo\" Qian" Date: Mon, 11 Feb 2019 11:01:28 -0800 Subject: REPL multiline support with recoverable errors (#1731) --- tools/repl_test.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/repl_test.py') diff --git a/tools/repl_test.py b/tools/repl_test.py index 2ce692b99..0958c18d0 100644 --- a/tools/repl_test.py +++ b/tools/repl_test.py @@ -84,6 +84,13 @@ class Repl(object): assertEqual(err, '') assertEqual(code, 0) + # This should print error instead of wait for input + def test_eval_unterminated(self): + out, err, code = self.input("eval('{')") + assertEqual(out, '') + assert "Unexpected end of input" in err + assertEqual(code, 0) + def test_reference_error(self): out, err, code = self.input("not_a_variable") assertEqual(out, '') -- cgit v1.2.3