From 6483e9817e349961f87d3540e824a15167f1cdc4 Mon Sep 17 00:00:00 2001 From: David Dworken Date: Wed, 22 Nov 2023 08:28:53 -0800 Subject: [PATCH] Another attempt at fixing testControlR/bash with presaving --- client/client_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/client_test.go b/client/client_test.go index 641bf26..3af874b 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -94,9 +94,9 @@ func TestParam(t *testing.T) { t.Run("testCustomColumns/"+tester.ShellName(), func(t *testing.T) { testCustomColumns(t, tester) }) t.Run("testUninstall/"+tester.ShellName(), func(t *testing.T) { testUninstall(t, tester) }) t.Run("testPresaving/"+tester.ShellName(), func(t *testing.T) { testPresaving(t, tester) }) - t.Run("testControlR/"+tester.ShellName(), func(t *testing.T) { testControlR(t, tester, tester.ShellName(), Online) }) + t.Run("testControlR/online/"+tester.ShellName(), func(t *testing.T) { testControlR(t, tester, tester.ShellName(), Online) }) + t.Run("testControlR/offline/"+tester.ShellName(), func(t *testing.T) { testControlR(t, tester, tester.ShellName(), Offline) }) } - t.Run("testControlR/offline/bash", func(t *testing.T) { testControlR(t, bashTester{}, "bash", Offline) }) t.Run("testControlR/fish", func(t *testing.T) { testControlR(t, bashTester{}, "fish", Online) }) t.Run("testTui/search/online", func(t *testing.T) { testTui_search(t, Online) }) t.Run("testTui/search/offline", func(t *testing.T) { testTui_search(t, Offline) }) @@ -1956,6 +1956,7 @@ func testControlR(t *testing.T, tester shellTester, shellName string, onlineStat // Disable recording so that all our testing commands don't get recorded _, _ = tester.RunInteractiveShellRelaxed(t, ` hishtory disable`) _, _ = tester.RunInteractiveShellRelaxed(t, `hishtory config-set enable-control-r true`) + _ = tester.RunInteractiveShell(t, `rm ~/.bash_history`) // Insert a few hishtory entries that we'll use for testing into an empty DB db := hctx.GetDb(hctx.MakeContext())