Add workaround for #221 to strip out escape codes from kitty in screen

This commit is contained in:
David Dworken
2024-08-25 18:56:53 -07:00
parent 1d27c15315
commit 6fd624f32c
4 changed files with 61 additions and 0 deletions

View File

@ -3290,4 +3290,21 @@ func TestConfigLogLevel(t *testing.T) {
require.Equal(t, "info\n", out)
}
func TestSanitizeEscapeCodes(t *testing.T) {
markTestForSharding(t, 17)
defer testutils.BackupAndRestore(t)()
tester := zshTester{}
installHishtory(t, tester, "")
// Input the escape code sequence
out := captureTerminalOutput(t, tester, []string{
"hishtory SPACE tquery ENTER",
"'11;rgb:1c1c/1c1c/1c1c'",
"SPACE",
})
// Compare the output with the golden file
testutils.CompareGoldens(t, out, "TestSanitizeEscapeCodes-Output")
}
// TODO: somehow test/confirm that hishtory works even if only bash/only zsh is installed