2
1
mirror of https://github.com/therootcompany/pathman.git synced 2025-07-05 09:56:32 +00:00
pathman/winpath/winpath_test.go
2019-07-28 03:55:53 -06:00

24 lines
471 B
Go

package winpath
import (
"fmt"
"os"
"testing"
)
func TestNormalize(t *testing.T) {
home, _ := os.UserHomeDir()
absexp := ""
homeexp := "%USERPROFILE%" + string(os.PathSeparator) + "foo"
abspath, homepath := NormalizePathEntry(home + string(os.PathSeparator) + "foo")
if absexp != abspath {
t.Error(fmt.Errorf("Expected %q, but got %q", absexp, abspath))
}
if homeexp != homepath {
t.Error(fmt.Errorf("Expected %q, but got %q", homeexp, homepath))
}
}