mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
test: Fix multiline mode tests and add toggle test
This commit is contained in:
parent
bec67074e0
commit
5f36ddd425
1 changed files with 3 additions and 3 deletions
|
@ -269,7 +269,7 @@ class TestInputOutputMultilineMode(unittest.TestCase):
|
||||||
"""Test that multiline mode properly handles newlines and submission"""
|
"""Test that multiline mode properly handles newlines and submission"""
|
||||||
self.io.multiline_mode = True
|
self.io.multiline_mode = True
|
||||||
|
|
||||||
# Simulate user typing "Hello", pressing Enter (newline),
|
# Simulate user typing "Hello", pressing Enter (newline),
|
||||||
# typing "World", then Alt+Enter to submit
|
# typing "World", then Alt+Enter to submit
|
||||||
user_input = "Hello\nWorld"
|
user_input = "Hello\nWorld"
|
||||||
self.io.prompt_session.prompt.return_value = user_input
|
self.io.prompt_session.prompt.return_value = user_input
|
||||||
|
@ -314,11 +314,11 @@ class TestInputOutputMultilineMode(unittest.TestCase):
|
||||||
"""Test that toggling multiline mode works correctly"""
|
"""Test that toggling multiline mode works correctly"""
|
||||||
# Start in single-line mode
|
# Start in single-line mode
|
||||||
self.io.multiline_mode = False
|
self.io.multiline_mode = False
|
||||||
|
|
||||||
# Toggle to multiline mode
|
# Toggle to multiline mode
|
||||||
self.io.toggle_multiline_mode()
|
self.io.toggle_multiline_mode()
|
||||||
self.assertTrue(self.io.multiline_mode)
|
self.assertTrue(self.io.multiline_mode)
|
||||||
|
|
||||||
# Toggle back to single-line mode
|
# Toggle back to single-line mode
|
||||||
self.io.toggle_multiline_mode()
|
self.io.toggle_multiline_mode()
|
||||||
self.assertFalse(self.io.multiline_mode)
|
self.assertFalse(self.io.multiline_mode)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue