From 07c3c76d0d7585dc49ffde79d38c406ca9f6e7ca Mon Sep 17 00:00:00 2001 From: "Kevin (Kun) \"Kassimo\" Qian" Date: Fri, 30 Aug 2019 23:45:35 -0700 Subject: Save last execution result in for REPL (#2843) --- 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 77e54dfdf..870824661 100644 --- a/tools/repl_test.py +++ b/tools/repl_test.py @@ -58,6 +58,7 @@ class TestRepl(DenoTestCase): def test_help_command(self): out, err, code = self.input("help") expectedOut = '\n'.join([ + "_ Print last execution output", "exit Exit the REPL", "help Print this help message", "", @@ -150,6 +151,12 @@ class TestRepl(DenoTestCase): self.assertTrue(err.startswith("Unable to save REPL history:")) self.assertEqual(code, 0) + def test_save_last_output(self): + out, err, code = self.input("1", "_") + self.assertEqual(out, '1\n1\n') + self.assertEqual(err, '') + self.assertEqual(code, 0) + if __name__ == "__main__": run_tests() -- cgit v1.2.3