Tweak zdotdir test to work on github actions

This commit is contained in:
David Dworken 2022-11-13 16:18:06 -08:00
parent c36e147fae
commit 6017eac4a3
No known key found for this signature in database

View File

@ -2169,9 +2169,8 @@ func TestZDotDir(t *testing.T) {
// Check that hishtory respected ZDOTDIR
zshrc, err := os.ReadFile(path.Join(homedir, data.HISHTORY_PATH, ".zshrc"))
zshrc = []byte(tester.RunInteractiveShell(t, `cat ~/.hishtory/.zshrc`))
testutils.Check(t, err)
if string(zshrc) != "\n# Hishtory Config:\nexport PATH=\"$PATH:/Users/david/.hishtory\"\nsource /Users/david/.hishtory/config.zsh\n" {
if !strings.Contains(string(zshrc), "# Hishtory Config:") {
t.Fatalf("zshrc had unexpected contents=%#v", string(zshrc))
}
}