mirror of
https://github.com/ddworken/hishtory.git
synced 2025-02-22 21:41:01 +01:00
Fix AI test by quoting the sent keys to ensure zsh doesn't complain about the question mark
This commit is contained in:
parent
a184bd4243
commit
3df099c945
@ -1946,7 +1946,7 @@ func testTui_ai(t *testing.T) {
|
||||
// Test running an AI query
|
||||
out := captureTerminalOutput(t, tester, []string{
|
||||
"hishtory SPACE tquery ENTER",
|
||||
"myQuery",
|
||||
"?myQuery",
|
||||
})
|
||||
out = strings.TrimSpace(strings.Split(out, "hishtory tquery")[1])
|
||||
testutils.CompareGoldens(t, out, "TestTui-AiQuery")
|
||||
|
@ -240,9 +240,9 @@ func captureTerminalOutputComplex(t testing.TB, captureConfig TmuxCaptureConfig)
|
||||
require.NotEmpty(t, captureConfig.complexCommands)
|
||||
for _, cmd := range captureConfig.complexCommands {
|
||||
if cmd.Keys != "" {
|
||||
fullCommand += " tmux send -t foo -- "
|
||||
fullCommand += " tmux send -t foo -- '"
|
||||
fullCommand += cmd.Keys
|
||||
fullCommand += "\n"
|
||||
fullCommand += "'\n"
|
||||
}
|
||||
if cmd.ResizeX != 0 && cmd.ResizeY != 0 {
|
||||
fullCommand += fmt.Sprintf(" tmux resize-window -t foo -x %d -y %d\n", cmd.ResizeX, cmd.ResizeY)
|
||||
|
Loading…
Reference in New Issue
Block a user