Add debug code for a github actions only test failure

This commit is contained in:
David Dworken 2022-10-22 23:54:35 -07:00
parent d5472be6b3
commit 9bdb1ed4ed

View File

@ -1748,6 +1748,8 @@ func captureTerminalOutputWithShellName(t *testing.T, tester shellTester, overri
return strings.TrimSpace(tester.RunInteractiveShell(t, fullCommand))
}
// TODO: check that if enable-control-r is false, then it isn't enabled
func testControlR(t *testing.T, tester shellTester, shellName string) {
// Setup
defer shared.BackupAndRestore(t)()
@ -1772,6 +1774,10 @@ func testControlR(t *testing.T, tester shellTester, shellName string) {
// And check that the control-r binding brings up the search
out := captureTerminalOutputWithShellName(t, tester, shellName, []string{"C-R"})
if !strings.Contains(out, "\n\n\n") {
if shellName == "zsh" {
// TODO: delete this debugging code
t.Fatalf("failed to find separator in %#v, compaudit=%#v", out, tester.RunInteractiveShell(t, "compaudit"))
}
t.Fatalf("failed to find separator in %#v", out)
}
stripped := strings.TrimSpace(strings.Split(out, "\n\n\n")[1])