mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
6d223febda
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
22 lines
510 B
Go
22 lines
510 B
Go
package 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)
|
|
}
|
|
}
|