Fix tests for importing so they pass on github actions

This commit is contained in:
David Dworken
2022-09-17 21:56:39 -07:00
parent 80f0660ade
commit 55f0f97d29
4 changed files with 47 additions and 4 deletions

View File

@ -94,7 +94,7 @@ func (z zshTester) RunInteractiveShellRelaxed(t *testing.T, script string) (stri
cmd.Stderr = &stderr
err := cmd.Run()
if err != nil {
return "", fmt.Errorf("unexpected error when running command=%#v, out=%#v, err=%#v: %v", script, stdout.String(), stderr.String(), err)
return stdout.String(), fmt.Errorf("unexpected error when running command=%#v, out=%#v, err=%#v: %v", script, stdout.String(), stderr.String(), err)
}
outStr := stdout.String()
if strings.Contains(outStr, "hishtory fatal error") {
@ -313,7 +313,7 @@ echo thisisrecorded`)
// Test the actual table output
hostnameMatcher := `\S+`
tableDividerMatcher := `\s+`
pathMatcher := `~/[a-zA-Z_0-9/-]+`
pathMatcher := `~?/[a-zA-Z_0-9/-]+`
datetimeMatcher := `[a-zA-Z]{3}\s\d{2}\s\d{4}\s[0-9:]+\s[A-Z]{3}`
runtimeMatcher := `[0-9.ms]+`
exitCodeMatcher := `0`