From 204ce106198e4c0d71b06e1e440190f0299b42f2 Mon Sep 17 00:00:00 2001 From: David Dworken Date: Fri, 21 Oct 2022 00:16:25 -0700 Subject: [PATCH] Make the TestTui function always use zsh since the TUI has nothing to do with shell support --- client/client_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/client_test.go b/client/client_test.go index 8fd99a0..8ac35a0 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -145,7 +145,6 @@ func TestParameterized(t *testing.T) { t.Run("testRemoteRedaction/"+tester.ShellName(), func(t *testing.T) { testRemoteRedaction(t, tester) }) t.Run("testMultipleUsers/"+tester.ShellName(), func(t *testing.T) { testMultipleUsers(t, tester) }) t.Run("testConfigGetSet/"+tester.ShellName(), func(t *testing.T) { testConfigGetSet(t, tester) }) - t.Run("testTui/"+tester.ShellName(), func(t *testing.T) { testTui(t, tester) }) t.Run("testControlR/"+tester.ShellName(), func(t *testing.T) { testControlR(t, tester) }) // TODO: Add a test for multi-line history entries } @@ -1615,7 +1614,7 @@ func TestFish(t *testing.T) { } } -func testTui(t *testing.T, tester shellTester) { +func TestTui(t *testing.T) { if os.Getenv("GITHUB_ACTION") != "" { t.Skip() // TODO: run this on actions. Need to fix the timezone bug, see https://github.com/ddworken/hishtory/actions/runs/3277144800/jobs/5394045156 @@ -1623,6 +1622,7 @@ func testTui(t *testing.T, tester shellTester) { // Setup defer shared.BackupAndRestore(t)() + tester := zshTester{} installHishtory(t, tester, "") // Disable recording so that all our testing commands don't get recorded @@ -1633,7 +1633,6 @@ func testTui(t *testing.T, tester shellTester) { db.Create(data.MakeFakeHistoryEntry("ls ~/")) db.Create(data.MakeFakeHistoryEntry("echo 'aaaaaa bbbb'")) - // TODO: Make the below actually use the correct shell // Check the initial output when there is no search out := strings.TrimSpace(tester.RunInteractiveShell(t, `tmux kill-session -t foo || true tmux -u new-session -d -x 200 -y 50 -s foo