From 082d342b0dcb064ce9f4fce0def15034c274fda7 Mon Sep 17 00:00:00 2001 From: David Dworken Date: Tue, 16 May 2023 17:34:25 -0700 Subject: [PATCH] Add test to cover breakage in #82 --- client/client_test.go | 4 +++- .../lib/goldens/testRemoveDuplicateRows-enabled-tquery-select | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 client/lib/goldens/testRemoveDuplicateRows-enabled-tquery-select diff --git a/client/client_test.go b/client/client_test.go index bcbcc49..ed23d6c 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -1790,7 +1790,6 @@ func TestFish(t *testing.T) { testutils.CompareGoldens(t, out, "TestFish-table") } -// TODO(ddworken):Add better tests for filtering out entries // TODO(ddworken): Run TestTui in online and offline mode func TestTui(t *testing.T) { @@ -2400,6 +2399,9 @@ echo foo`) out = captureTerminalOutput(t, tester, []string{"hishtory SPACE tquery SPACE -pipefail ENTER"}) out = strings.TrimSpace(strings.Split(out, "hishtory tquery")[1]) testutils.CompareGoldens(t, out, "testRemoveDuplicateRows-enabled-tquery") + out = captureTerminalOutput(t, tester, []string{"hishtory SPACE tquery SPACE -pipefail ENTER", "Down Down", "ENTER"}) + out = strings.TrimSpace(strings.Split(out, "hishtory tquery")[1]) + testutils.CompareGoldens(t, out, "testRemoveDuplicateRows-enabled-tquery-select") } func TestSetConfigNoCorruption(t *testing.T) { diff --git a/client/lib/goldens/testRemoveDuplicateRows-enabled-tquery-select b/client/lib/goldens/testRemoveDuplicateRows-enabled-tquery-select new file mode 100644 index 0000000..940e048 --- /dev/null +++ b/client/lib/goldens/testRemoveDuplicateRows-enabled-tquery-select @@ -0,0 +1,3 @@ +-pipefail +echo foo +david@Davids-MacBook-Air hishtory % \ No newline at end of file