Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable baacketed-paste mode in bash 5.1 and newer (issue pexpect#669)
The bash versions starting with 5.1 have bracketed paste mode enabled by default, leading to test failures in replwrap.bash(), e.g.: self = <tests.test_replwrap.REPLWrapTestCase testMethod=test_multiline> def test_multiline(self): bash = replwrap.bash() res = bash.run_command("echo '1 2\n3 4'") > self.assertEqual(res.strip().splitlines(), ['1 2', '3 4']) E AssertionError: Lists differ: ['\x1b[?2004l', '\x1b[?2004h\x1b[?2004l', '1 2', '3 4', '\x1b[?2004h'] != ['1 2', '3 4'] E E First differing element 0: E '\x1b[?2004l' E '1 2' E E First list contains 3 additional elements. E First extra element 2: E '1 2' E E - ['\x1b[?2004l', '\x1b[?2004h\x1b[?2004l', '1 2', '3 4', '\x1b[?2004h'] E + ['1 2', '3 4'] With bracketed test mode disabled, the tests that were affected by the inserted escape sequences succeed.
- Loading branch information