You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
450 B
Go
20 lines
450 B
Go
//go:build windows
|
|
|
|
package nfs_test
|
|
|
|
import (
|
|
"git.noahlan.cn/noahlan/ntool/nfs"
|
|
"git.noahlan.cn/noahlan/ntool/ntest/assert"
|
|
"testing"
|
|
)
|
|
|
|
func TestSlashPath_win(t *testing.T) {
|
|
assert.Eq(t, "path\\to\\dir", nfs.JoinPaths("path", "to", "dir"))
|
|
assert.Eq(t, "path\\to\\dir", nfs.JoinSubPaths("path", "to", "dir"))
|
|
}
|
|
|
|
func TestRealpath_win(t *testing.T) {
|
|
inPath := "/path/to/some/../dir"
|
|
assert.Eq(t, "\\path\\to\\dir", nfs.Realpath(inPath))
|
|
}
|