rclone/vfs/vfstest/write_non_unix.go

24 lines
612 B
Go
Raw Normal View History

2021-09-09 20:25:25 +08:00
//go:build !linux && !darwin && !freebsd
2017-05-10 18:19:32 +08:00
// +build !linux,!darwin,!freebsd
package vfstest
2017-05-10 18:19:32 +08:00
import (
"runtime"
"testing"
"golang.org/x/sys/windows"
2017-05-10 18:19:32 +08:00
)
// TestWriteFileDoubleClose tests double close on write
func TestWriteFileDoubleClose(t *testing.T) {
t.Skip("not supported on " + runtime.GOOS)
}
// writeTestDup performs the platform-specific implementation of the dup() syscall
func writeTestDup(oldfd uintptr) (uintptr, error) {
p := windows.CurrentProcess()
var h windows.Handle
return uintptr(h), windows.DuplicateHandle(p, windows.Handle(oldfd), p, &h, 0, true, windows.DUPLICATE_SAME_ACCESS)
}