mirror of
https://github.com/rclone/rclone.git
synced 2024-11-26 02:14:42 +01:00
27 lines
656 B
Go
27 lines
656 B
Go
//go:build !linux && !darwin && !freebsd
|
|
// +build !linux,!darwin,!freebsd
|
|
|
|
package vfstest
|
|
|
|
import (
|
|
"runtime"
|
|
"testing"
|
|
|
|
"golang.org/x/sys/windows"
|
|
)
|
|
|
|
// 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, err := windows.GetCurrentProcess()
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
var h windows.Handle
|
|
return uintptr(h), windows.DuplicateHandle(p, windows.Handle(oldfd), p, &h, 0, true, windows.DUPLICATE_SAME_ACCESS)
|
|
}
|