Make testControlR more reliable by making it more lenient in how it looks for the separator

This commit is contained in:
David Dworken 2023-09-22 20:03:41 -07:00
parent 51ca2578b7
commit 5168efb2c8
No known key found for this signature in database

View File

@ -2130,8 +2130,8 @@ func testControlR(t testing.TB, tester shellTester, shellName string, onlineStat
// And check that the control-r binding brings up the search
out := captureTerminalOutputWithShellName(t, tester, shellName, []string{"C-R"})
require.Contains(t, out, "\n\n\n", "failed to find separator")
out = strings.TrimSpace(strings.Split(out, "\n\n\n")[1])
require.Contains(t, out, "\n\n", "failed to find separator")
out = strings.TrimSpace(strings.Split(out, "\n\n")[1])
testutils.CompareGoldens(t, out, "testControlR-Initial")
// And check that we can scroll down and select an option