Skip to content

Commit

Permalink
test(dir): fix failing unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Jason <[email protected]>
  • Loading branch information
JasonTheDeveloper committed Sep 2, 2024
1 parent 045ebb6 commit e816f4b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dir/path_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
package dir

import (
"os"
"path/filepath"
"testing"
)
Expand Down Expand Up @@ -45,9 +46,11 @@ func Test_UserConfigDirPath(t *testing.T) {

func Test_NoHomeVariable(t *testing.T) {
t.Setenv("HOME", "")
userConfigDir := UserConfigDirPath()
if userConfigDir != "notation" {
t.Fatalf(`UserConfigDirPath() = %q, want "notation"`, userConfigDir)
UserConfigDir = ""
userConfigDir = os.UserConfigDir
got := UserConfigDirPath()
if got != "notation" {
t.Fatalf(`UserConfigDirPath() = %q, want "notation"`, UserConfigDir)
}
}

Expand Down

0 comments on commit e816f4b

Please sign in to comment.