macos: skip TestUtimesNanoSymlink early

Gets rid of the touch error message upon running the tests.
This commit is contained in:
Jakob Unterwurzacher 2018-03-05 21:32:07 +01:00
parent b820fa691d
commit aa65091bb9
1 changed files with 3 additions and 4 deletions

View File

@ -685,6 +685,9 @@ func TestLchown(t *testing.T) {
// Set nanoseconds by path, symlink
func TestUtimesNanoSymlink(t *testing.T) {
if runtime.GOOS == "darwin" {
t.Skipf("MacOS \"touch\" does not support \"--no-dereference\"")
}
path := test_helpers.DefaultPlainDir + "/utimesnano_symlink"
err := os.Symlink("/some/nonexisting/file", path)
if err != nil {
@ -697,10 +700,6 @@ func TestUtimesNanoSymlink(t *testing.T) {
cmd.Stdout = os.Stdout
err = cmd.Run()
if err != nil {
if runtime.GOOS == "darwin" {
// MacOS "touch" does not support "--no-dereference"
t.Skip(err)
}
t.Error(err)
}
}