X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Ftest-unlink.h;h=e65057de4747a268144677634c978aa76e253007;hb=24208770c8721323060207c9be83dd24400678d3;hp=6b6384e50f864efbc34aa171cb55000f68f8e983;hpb=b0d3085924955e48a830dd1630989471f4bc57cb;p=pspp diff --git a/tests/test-unlink.h b/tests/test-unlink.h index 6b6384e50f..e65057de47 100644 --- a/tests/test-unlink.h +++ b/tests/test-unlink.h @@ -68,14 +68,17 @@ test_unlink_func (int (*func) (char const *name), bool print) ASSERT (func (BASE "dir/file") == 0); ASSERT (rmdir (BASE "dir") == 0); if (print) - fputs ("skipping test: symlinks not supported on this file system\n", - stderr); + fputs ("skipping test: symlinks not supported on this file system\n", + stderr); return 77; } if (cannot_unlink_dir ()) ASSERT (func (BASE "link/") == -1); ASSERT (func (BASE "link") == 0); ASSERT (symlink (BASE "dir/file", BASE "link") == 0); + errno = 0; + ASSERT (func (BASE "link/") == -1); + ASSERT (errno == ENOTDIR); /* Order here proves unlink of a symlink does not follow through to the file. */ ASSERT (func (BASE "link") == 0);