From 19c42e84d5edae02f051fb87b7e9c083f5fc6f48 Mon Sep 17 00:00:00 2001 From: "g@localhost.localdomain" <> Date: Fri, 9 Mar 2007 00:25:00 +0100 Subject: [PATCH] Added test for Ctrl-C while in non-interactive mode --- tests/tests/non_interactive.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/tests/non_interactive.py b/tests/tests/non_interactive.py index 3b6ed47..6f008c8 100644 --- a/tests/tests/non_interactive.py +++ b/tests/tests/non_interactive.py @@ -31,4 +31,12 @@ class TestNonInteractive(unittest.TestCase): child.expect('localhost: some text') child.expect(pexpect.EOF) + def testCommandIntr(self): + child = launch_gsh(['--command=echo some text; cat', 'localhost']) + child.expect('localhost: some text') + child.sendintr() + child.expect(pexpect.EOF) + child.close() + self.assertEqual(child.exitstatus, 1) + TESTS=(TestNonInteractive,) -- 2.11.4.GIT