Skip to content

Commit cde90ae

Browse files
committed
ui-tests: add ping interrupt test
The fixes of 7674c51 (Cygwin: console: Set ENABLE_PROCESSED_INPUT when disable_master_thread, 2025-07-01) were unfortunately not complete; There were still a couple of edge cases where Ctrl+C was unable to interrupt processes. Let's add a demonstration of that issue. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent d25535d commit cde90ae

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ui-tests/ctrl-c.ahk

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@ Sleep 150
4040
; Wait for the `^C` tell-tale that is the PowerShell prompt to appear
4141
WaitForRegExInWindowsTerminal('>[ `n`r]*$', 'Timed out waiting for interrupt', 'Sleep was interrupted as desired')
4242

43+
; ping test (`cat.exe` should be interrupted, too)
44+
Send('git -c alias.c="{!}cat | /c/windows/system32/ping -t localhost" c{Enter}')
45+
Sleep 500
46+
WaitForRegExInWindowsTerminal('Pinging ', 'Timed out waiting for pinging to start', 'Pinging started')
47+
Send('^C') ; interrupt ping and cat
48+
Sleep 150
49+
; Wait for the `^C` tell-tale to appear
50+
WaitForRegExInWindowsTerminal('Control-C', 'Timed out waiting for pinging to be interrupted', 'Pinging was interrupted as desired')
51+
; Wait for the `^C` tell-tale that is the PowerShell prompt to appear
52+
WaitForRegExInWindowsTerminal('>[ `n`r]*$', 'Timed out waiting for `cat.exe` to be interrupted', '`cat.exe` was interrupted as desired')
53+
4354
; Clone via SSH test; Requires an OpenSSH for Windows `sshd.exe` whose directory needs to be specified via
4455
; the environment variable `OPENSSH_FOR_WINDOWS_DIRECTORY`. The clone will still be performed via Git's
4556
; included `ssh.exe`, to exercise the MSYS2 runtime (which these UI tests are all about).

0 commit comments

Comments
 (0)