1
0
mirror of https://github.com/ddworken/hishtory.git synced 2025-07-14 19:35:39 +02:00

Remove set -m from test that breaks it for zsh

This commit is contained in:
David Dworken
2022-04-17 23:31:08 -07:00
parent 720fd7ee68
commit 97f5368954

@ -351,8 +351,7 @@ func testAdvancedQuery(t *testing.T, tester shellTester) {
userSecret := installHishtory(t, tester, "") userSecret := installHishtory(t, tester, "")
// Run some commands we can query for // Run some commands we can query for
_, err := tester.RunInteractiveShellRelaxed(t, `set -m _, err := tester.RunInteractiveShellRelaxed(t, `echo nevershouldappear
echo nevershouldappear
notacommand notacommand
cd /tmp/ cd /tmp/
echo querybydir echo querybydir
@ -490,11 +489,8 @@ hishtory disable`)
if strings.Contains(out, "echo") { if strings.Contains(out, "echo") {
t.Fatalf("hishtory query contains unexpected result, out=%#v", out) t.Fatalf("hishtory query contains unexpected result, out=%#v", out)
} }
if tester.ShellName() == "bash" { if strings.Count(out, "\n") != 4 {
// TODO t.Fatalf("hishtory query has the wrong number of lines=%d, out=%#v", strings.Count(out, "\n"), out)
if strings.Count(out, "\n") != 5 {
t.Fatalf("hishtory query has the wrong number of lines=%d, out=%#v", strings.Count(out, "\n"), out)
}
} }
// Test filtering out with an atom // Test filtering out with an atom
@ -518,7 +514,7 @@ hishtory disable`)
if strings.Contains(out, "echo") { if strings.Contains(out, "echo") {
t.Fatalf("hishtory query contains unexpected result, out=%#v", out) t.Fatalf("hishtory query contains unexpected result, out=%#v", out)
} }
if strings.Count(out, "\n") != 5 { if strings.Count(out, "\n") != 4 {
t.Fatalf("hishtory query has the wrong number of lines=%d, out=%#v", strings.Count(out, "\n"), out) t.Fatalf("hishtory query has the wrong number of lines=%d, out=%#v", strings.Count(out, "\n"), out)
} }
} }