mirror of
https://github.com/ddworken/hishtory.git
synced 2025-08-13 16:57:23 +02:00
Add workaround for #221 to strip out escape codes from kitty in screen
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user