(self)
| 70 | assert "real" in res, res |
| 71 | |
| 72 | async def test_async_replwrap_multiline(self): |
| 73 | bash = replwrap.bash() |
| 74 | res = await bash.run_command("echo '1 2\n3 4'", async_=True) |
| 75 | self.assertEqual(res.strip().splitlines(), ["1 2", "3 4"]) |
| 76 | |
| 77 | # Should raise ValueError if input is incomplete |
| 78 | try: |
| 79 | await bash.run_command("echo '5 6", async_=True) |
| 80 | except ValueError: |
| 81 | pass |
| 82 | else: |
| 83 | assert False, "Didn't raise ValueError for incomplete input" |
| 84 | |
| 85 | # Check that the REPL was reset (SIGINT) after the incomplete input |
| 86 | res = await bash.run_command("echo '1 2\n3 4'", async_=True) |
| 87 | self.assertEqual(res.strip().splitlines(), ["1 2", "3 4"]) |
nothing calls this directly
no test coverage detected