File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1327,3 +1327,17 @@ def test_readline_history_file(self):
1327
1327
def test_keyboard_interrupt_after_isearch (self ):
1328
1328
output , exit_code = self .run_repl (["\x12 " , "\x03 " , "exit" ])
1329
1329
self .assertEqual (exit_code , 0 )
1330
+
1331
+ def test_prompt_after_help (self ):
1332
+ # Ensure that we don't see a double prompt after exiting `help`
1333
+ output , exit_code = self .run_repl (["help" , "q" , "exit" ])
1334
+
1335
+ # Regex pattern to remove ANSI escape sequences
1336
+ ansi_escape = re .compile (r"(\x9B|\x1B\[)[0-?]*[ -\/]*[@-~]" )
1337
+
1338
+ # Remove ANSI escape codes from the string
1339
+ cleaned_output = ansi_escape .sub ("" , output )
1340
+
1341
+ self .assertEqual (exit_code , 0 )
1342
+ self .assertRegex (cleaned_output , r"(?<!>>> )>>>\s*$" )
1343
+
You can’t perform that action at this time.
0 commit comments