mirror of
https://github.com/restic/restic.git
synced 2024-08-21 11:53:22 +02:00
31 lines
638 B
Go
31 lines
638 B
Go
package fs_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"bazil.org/fuse/fs/fstestutil"
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
type exchangeData struct {
|
|
fstestutil.File
|
|
// this struct cannot be zero size or multiple instances may look identical
|
|
_ int
|
|
}
|
|
|
|
func TestExchangeDataNotSupported(t *testing.T) {
|
|
t.Parallel()
|
|
mnt, err := fstestutil.MountedT(t, fstestutil.SimpleFS{&fstestutil.ChildMap{
|
|
"one": &exchangeData{},
|
|
"two": &exchangeData{},
|
|
}}, nil)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
defer mnt.Close()
|
|
|
|
if err := unix.Exchangedata(mnt.Dir+"/one", mnt.Dir+"/two", 0); err != unix.ENOTSUP {
|
|
t.Fatalf("expected ENOTSUP from exchangedata: %v", err)
|
|
}
|
|
}
|