From 1fde15c0bc77e0c5cc6f7cbf27b4e072e1ad6c46 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Fri, 12 Jul 2019 10:23:08 -0400 Subject: Fix REPL when it receives EOF (#2638) --- tools/repl_test.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools/repl_test.py') diff --git a/tools/repl_test.py b/tools/repl_test.py index e8b1f1a6f..5ad7722ee 100644 --- a/tools/repl_test.py +++ b/tools/repl_test.py @@ -38,6 +38,12 @@ class TestRepl(DenoTestCase): self.assertEqual(err, '') self.assertEqual(code, 0) + def test_eof(self): + out, err, code = self.input("1 + 2", exit=False) + self.assertEqual(out, '3\n') + self.assertEqual(err, '') + self.assertEqual(code, 0) + def test_exit_command(self): out, err, code = self.input("exit", "'ignored'", exit=False) self.assertEqual(out, '') -- cgit v1.2.3