2
1
şunun yansıması https://github.com/therootcompany/pathman.git eşitlendi 2025-09-18 16:28:19 +00:00
pathman/winpath/winpath_test.go
2019-07-28 03:55:53 -06:00

24 satır
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))
}
}