Update vendored library github.com/pkg/xattr

This commit is contained in:
Alexander Neumann 2018-03-30 12:38:37 +02:00
parent 19035e977b
commit 75946e7c58
9 changed files with 48 additions and 11 deletions

View file

@ -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)