mirror of
https://github.com/ddworken/hishtory.git
synced 2024-12-28 09:48:59 +01:00
Add integration test for #226
This commit is contained in:
parent
c0a56eeada
commit
6dc88c18ce
@ -822,6 +822,15 @@ echo other`)
|
|||||||
t.Fatalf("hishtory query has unexpected number of lines: out=%#v", out)
|
t.Fatalf("hishtory query has unexpected number of lines: out=%#v", out)
|
||||||
}
|
}
|
||||||
require.Contains(t, out, "/tmp")
|
require.Contains(t, out, "/tmp")
|
||||||
|
|
||||||
|
// Record a command in a directory that does not exist
|
||||||
|
tester.RunInteractiveShell(t, `mkdir /tmp/deleted-test
|
||||||
|
cd /tmp/deleted-test
|
||||||
|
rm -rf /tmp/deleted-test
|
||||||
|
echo test2
|
||||||
|
`)
|
||||||
|
out = hishtoryQuery(t, tester, "echo test2")
|
||||||
|
require.Contains(t, out, "/tmp/deleted-test")
|
||||||
}
|
}
|
||||||
|
|
||||||
func testHishtoryBackgroundSaving(t *testing.T, tester shellTester) {
|
func testHishtoryBackgroundSaving(t *testing.T, tester shellTester) {
|
||||||
|
Loading…
Reference in New Issue
Block a user