Python cmd.use_rawinput() Examples
The following are 18
code examples of cmd.use_rawinput().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
cmd
, or try the search function
.
Example #1
Source File: test_cmd.py From ironpython3 with Apache License 2.0 | 6 votes |
def test_input_reset_at_EOF(self): input = io.StringIO("print test\nprint test2") output = io.StringIO() cmd = self.simplecmd2(stdin=input, stdout=output) cmd.use_rawinput = False cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) test\n" "(Cmd) test2\n" "(Cmd) *** Unknown syntax: EOF\n")) input = io.StringIO("print \n\n") output = io.StringIO() cmd.stdin = input cmd.stdout = output cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) \n" "(Cmd) \n" "(Cmd) *** Unknown syntax: EOF\n"))
Example #2
Source File: test_cmd.py From CTFCrackTools with GNU General Public License v3.0 | 6 votes |
def test_input_reset_at_EOF(self): input = StringIO.StringIO("print test\nprint test2") output = StringIO.StringIO() cmd = self.simplecmd2(stdin=input, stdout=output) cmd.use_rawinput = False cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) test\n" "(Cmd) test2\n" "(Cmd) *** Unknown syntax: EOF\n")) input = StringIO.StringIO("print \n\n") output = StringIO.StringIO() cmd.stdin = input cmd.stdout = output cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) \n" "(Cmd) \n" "(Cmd) *** Unknown syntax: EOF\n"))
Example #3
Source File: test_cmd.py From CTFCrackTools-V2 with GNU General Public License v3.0 | 6 votes |
def test_input_reset_at_EOF(self): input = StringIO.StringIO("print test\nprint test2") output = StringIO.StringIO() cmd = self.simplecmd2(stdin=input, stdout=output) cmd.use_rawinput = False cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) test\n" "(Cmd) test2\n" "(Cmd) *** Unknown syntax: EOF\n")) input = StringIO.StringIO("print \n\n") output = StringIO.StringIO() cmd.stdin = input cmd.stdout = output cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) \n" "(Cmd) \n" "(Cmd) *** Unknown syntax: EOF\n"))
Example #4
Source File: test_cmd.py From Project-New-Reign---Nemesis-Main with GNU General Public License v3.0 | 6 votes |
def test_input_reset_at_EOF(self): input = io.StringIO("print test\nprint test2") output = io.StringIO() cmd = self.simplecmd2(stdin=input, stdout=output) cmd.use_rawinput = False cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) test\n" "(Cmd) test2\n" "(Cmd) *** Unknown syntax: EOF\n")) input = io.StringIO("print \n\n") output = io.StringIO() cmd.stdin = input cmd.stdout = output cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) \n" "(Cmd) \n" "(Cmd) *** Unknown syntax: EOF\n"))
Example #5
Source File: test_cmd.py From gcblue with BSD 3-Clause "New" or "Revised" License | 6 votes |
def test_input_reset_at_EOF(self): input = StringIO.StringIO("print test\nprint test2") output = StringIO.StringIO() cmd = self.simplecmd2(stdin=input, stdout=output) cmd.use_rawinput = False cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) test\n" "(Cmd) test2\n" "(Cmd) *** Unknown syntax: EOF\n")) input = StringIO.StringIO("print \n\n") output = StringIO.StringIO() cmd.stdin = input cmd.stdout = output cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) \n" "(Cmd) \n" "(Cmd) *** Unknown syntax: EOF\n"))
Example #6
Source File: test_cmd.py From Fluid-Designer with GNU General Public License v3.0 | 6 votes |
def test_input_reset_at_EOF(self): input = io.StringIO("print test\nprint test2") output = io.StringIO() cmd = self.simplecmd2(stdin=input, stdout=output) cmd.use_rawinput = False cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) test\n" "(Cmd) test2\n" "(Cmd) *** Unknown syntax: EOF\n")) input = io.StringIO("print \n\n") output = io.StringIO() cmd.stdin = input cmd.stdout = output cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) \n" "(Cmd) \n" "(Cmd) *** Unknown syntax: EOF\n"))
Example #7
Source File: test_cmd.py From oss-ftp with MIT License | 6 votes |
def test_input_reset_at_EOF(self): input = StringIO.StringIO("print test\nprint test2") output = StringIO.StringIO() cmd = self.simplecmd2(stdin=input, stdout=output) cmd.use_rawinput = False cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) test\n" "(Cmd) test2\n" "(Cmd) *** Unknown syntax: EOF\n")) input = StringIO.StringIO("print \n\n") output = StringIO.StringIO() cmd.stdin = input cmd.stdout = output cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) \n" "(Cmd) \n" "(Cmd) *** Unknown syntax: EOF\n"))
Example #8
Source File: test_cmd.py From BinderFilter with MIT License | 6 votes |
def test_input_reset_at_EOF(self): input = StringIO.StringIO("print test\nprint test2") output = StringIO.StringIO() cmd = self.simplecmd2(stdin=input, stdout=output) cmd.use_rawinput = False cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) test\n" "(Cmd) test2\n" "(Cmd) *** Unknown syntax: EOF\n")) input = StringIO.StringIO("print \n\n") output = StringIO.StringIO() cmd.stdin = input cmd.stdout = output cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) \n" "(Cmd) \n" "(Cmd) *** Unknown syntax: EOF\n"))
Example #9
Source File: test_cmd.py From ironpython2 with Apache License 2.0 | 6 votes |
def test_input_reset_at_EOF(self): input = StringIO.StringIO("print test\nprint test2") output = StringIO.StringIO() cmd = self.simplecmd2(stdin=input, stdout=output) cmd.use_rawinput = False cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) test\n" "(Cmd) test2\n" "(Cmd) *** Unknown syntax: EOF\n")) input = StringIO.StringIO("print \n\n") output = StringIO.StringIO() cmd.stdin = input cmd.stdout = output cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) \n" "(Cmd) \n" "(Cmd) *** Unknown syntax: EOF\n"))
Example #10
Source File: test_cmd.py From Fluid-Designer with GNU General Public License v3.0 | 5 votes |
def test_file_with_missing_final_nl(self): input = io.StringIO("print test\nprint test2") output = io.StringIO() cmd = self.simplecmd(stdin=input, stdout=output) cmd.use_rawinput = False cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) test\n" "(Cmd) test2\n" "(Cmd) "))
Example #11
Source File: test_cmd.py From ironpython3 with Apache License 2.0 | 5 votes |
def test_file_with_missing_final_nl(self): input = io.StringIO("print test\nprint test2") output = io.StringIO() cmd = self.simplecmd(stdin=input, stdout=output) cmd.use_rawinput = False cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) test\n" "(Cmd) test2\n" "(Cmd) "))
Example #12
Source File: test_cmd.py From ironpython2 with Apache License 2.0 | 5 votes |
def test_file_with_missing_final_nl(self): input = StringIO.StringIO("print test\nprint test2") output = StringIO.StringIO() cmd = self.simplecmd(stdin=input, stdout=output) cmd.use_rawinput = False cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) test\n" "(Cmd) test2\n" "(Cmd) "))
Example #13
Source File: test_cmd.py From gcblue with BSD 3-Clause "New" or "Revised" License | 5 votes |
def test_file_with_missing_final_nl(self): input = StringIO.StringIO("print test\nprint test2") output = StringIO.StringIO() cmd = self.simplecmd(stdin=input, stdout=output) cmd.use_rawinput = False cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) test\n" "(Cmd) test2\n" "(Cmd) "))
Example #14
Source File: test_cmd.py From oss-ftp with MIT License | 5 votes |
def test_file_with_missing_final_nl(self): input = StringIO.StringIO("print test\nprint test2") output = StringIO.StringIO() cmd = self.simplecmd(stdin=input, stdout=output) cmd.use_rawinput = False cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) test\n" "(Cmd) test2\n" "(Cmd) "))
Example #15
Source File: test_cmd.py From Project-New-Reign---Nemesis-Main with GNU General Public License v3.0 | 5 votes |
def test_file_with_missing_final_nl(self): input = io.StringIO("print test\nprint test2") output = io.StringIO() cmd = self.simplecmd(stdin=input, stdout=output) cmd.use_rawinput = False cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) test\n" "(Cmd) test2\n" "(Cmd) "))
Example #16
Source File: test_cmd.py From CTFCrackTools-V2 with GNU General Public License v3.0 | 5 votes |
def test_file_with_missing_final_nl(self): input = StringIO.StringIO("print test\nprint test2") output = StringIO.StringIO() cmd = self.simplecmd(stdin=input, stdout=output) cmd.use_rawinput = False cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) test\n" "(Cmd) test2\n" "(Cmd) "))
Example #17
Source File: test_cmd.py From BinderFilter with MIT License | 5 votes |
def test_file_with_missing_final_nl(self): input = StringIO.StringIO("print test\nprint test2") output = StringIO.StringIO() cmd = self.simplecmd(stdin=input, stdout=output) cmd.use_rawinput = False cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) test\n" "(Cmd) test2\n" "(Cmd) "))
Example #18
Source File: test_cmd.py From CTFCrackTools with GNU General Public License v3.0 | 5 votes |
def test_file_with_missing_final_nl(self): input = StringIO.StringIO("print test\nprint test2") output = StringIO.StringIO() cmd = self.simplecmd(stdin=input, stdout=output) cmd.use_rawinput = False cmd.cmdloop() self.assertMultiLineEqual(output.getvalue(), ("(Cmd) test\n" "(Cmd) test2\n" "(Cmd) "))