Remove debugging information and give up on that test, and add work around for weird zsh bug with importing

This commit is contained in:
David Dworken
2022-09-22 18:09:51 -07:00
parent 99b51a356e
commit ee6680f571
5 changed files with 38 additions and 9 deletions

View File

@ -91,6 +91,13 @@ func TestBuildHistoryEntry(t *testing.T) {
if entry.StartTime.Unix() != 1641774958 {
t.Fatalf("history entry has incorrect Unix time in the start time: %v", entry.StartTime.Unix())
}
// Test the weird zsh bug
entry, err = BuildHistoryEntry(hctx.MakeContext(), []string{"unused", "saveHistoryEntry", "zsh", "120", ": 1663823053:0;echo foo\n", "1641774958"})
shared.Check(t, err)
if entry.Command != "echo foo" {
t.Fatalf("expected the zsh command to be worked around, actual=%s", entry.Command)
}
}
func TestPersist(t *testing.T) {