mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-19 16:51:01 -04:00
ab6c553e6b
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
22 lines
560 B
Go
22 lines
560 B
Go
package longpath // import "github.com/docker/docker/pkg/longpath"
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestStandardLongPath(t *testing.T) {
|
|
c := `C:\simple\path`
|
|
longC := AddPrefix(c)
|
|
if !strings.EqualFold(longC, `\\?\C:\simple\path`) {
|
|
t.Errorf("Wrong long path returned. Original = %s ; Long = %s", c, longC)
|
|
}
|
|
}
|
|
|
|
func TestUNCLongPath(t *testing.T) {
|
|
c := `\\server\share\path`
|
|
longC := AddPrefix(c)
|
|
if !strings.EqualFold(longC, `\\?\UNC\server\share\path`) {
|
|
t.Errorf("Wrong UNC long path returned. Original = %s ; Long = %s", c, longC)
|
|
}
|
|
}
|