mirror of
https://github.com/restic/restic.git
synced 2025-12-08 06:09:56 +00:00
Update vendored library github.com/pkg/xattr
This commit is contained in:
parent
19035e977b
commit
75946e7c58
9 changed files with 48 additions and 11 deletions
11
vendor/github.com/pkg/xattr/xattr_test.go
generated
vendored
11
vendor/github.com/pkg/xattr/xattr_test.go
generated
vendored
|
|
@ -12,12 +12,16 @@ const UserPrefix = "user."
|
|||
|
||||
func Test(t *testing.T) {
|
||||
tmp, err := ioutil.TempFile("", "")
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.Remove(tmp.Name())
|
||||
|
||||
// Check if filesystem supports extended attributes
|
||||
if !Supported(tmp.Name()) {
|
||||
t.Skip("Skipping test - filesystem does not support extended attributes")
|
||||
}
|
||||
|
||||
err = Set(tmp.Name(), UserPrefix+"test", []byte("test-attr-value"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
|
@ -63,6 +67,11 @@ func TestNoData(t *testing.T) {
|
|||
}
|
||||
defer os.Remove(tmp.Name())
|
||||
|
||||
// Check if filesystem supports extended attributes
|
||||
if !Supported(tmp.Name()) {
|
||||
t.Skip("Skipping test - filesystem does not support extended attributes")
|
||||
}
|
||||
|
||||
err = Set(tmp.Name(), UserPrefix+"test", []byte{})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue