1 // Copyright 2016 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 //go:build aix || darwin || dragonfly || freebsd || hurd || (js && wasm) || linux || netbsd || openbsd || solaris
16 isExistTests
= append(isExistTests
,
17 isExistTest
{err
: &fs
.PathError
{Err
: syscall
.EEXIST
}, is
: true, isnot
: false},
18 isExistTest
{err
: &fs
.PathError
{Err
: syscall
.ENOTEMPTY
}, is
: true, isnot
: false},
20 isExistTest
{err
: &os
.LinkError
{Err
: syscall
.EEXIST
}, is
: true, isnot
: false},
21 isExistTest
{err
: &os
.LinkError
{Err
: syscall
.ENOTEMPTY
}, is
: true, isnot
: false},
23 isExistTest
{err
: &os
.SyscallError
{Err
: syscall
.EEXIST
}, is
: true, isnot
: false},
24 isExistTest
{err
: &os
.SyscallError
{Err
: syscall
.ENOTEMPTY
}, is
: true, isnot
: false},
26 isPermissionTests
= append(isPermissionTests
,
27 isPermissionTest
{err
: &fs
.PathError
{Err
: syscall
.EACCES
}, want
: true},
28 isPermissionTest
{err
: &fs
.PathError
{Err
: syscall
.EPERM
}, want
: true},
29 isPermissionTest
{err
: &fs
.PathError
{Err
: syscall
.EEXIST
}, want
: false},
31 isPermissionTest
{err
: &os
.LinkError
{Err
: syscall
.EACCES
}, want
: true},
32 isPermissionTest
{err
: &os
.LinkError
{Err
: syscall
.EPERM
}, want
: true},
33 isPermissionTest
{err
: &os
.LinkError
{Err
: syscall
.EEXIST
}, want
: false},
35 isPermissionTest
{err
: &os
.SyscallError
{Err
: syscall
.EACCES
}, want
: true},
36 isPermissionTest
{err
: &os
.SyscallError
{Err
: syscall
.EPERM
}, want
: true},
37 isPermissionTest
{err
: &os
.SyscallError
{Err
: syscall
.EEXIST
}, want
: false},