Files
Reims-Go/internal/guesttools/rootfs_windows_test.go

28 lines
563 B
Go

package guesttools
import (
"testing"
"golang.org/x/sys/windows"
)
func TestReparseTagNameSurrogate(t *testing.T) {
const (
cloud = 0x9000001A // IO_REPARSE_TAG_CLOUD
cloudF = 0x9000F01A // IO_REPARSE_TAG_CLOUD_F
)
for _, tc := range []struct {
tag uint32
want bool
}{
{windows.IO_REPARSE_TAG_MOUNT_POINT, true},
{windows.IO_REPARSE_TAG_SYMLINK, true},
{cloud, false},
{cloudF, false},
} {
if got := isReparseTagNameSurrogate(tc.tag); got != tc.want {
t.Errorf("tag %#08x: surrogate = %t, want %t", tc.tag, got, tc.want)
}
}
}