diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2020-04-21 21:48:11 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@broadpark.no> | 2020-04-21 21:49:22 +0200 |
commit | fb5d56601a7c54c5ee6d7c20d7c0c208db3ffc6a (patch) | |
tree | 3a17043579a133f4ec8a732f079b49a1e48d67df /vespalib | |
parent | 7459919a0ad0c51d4b78c1642aae72997ed14b47 (diff) |
A failed attempt at unlinking a directory causes another exception
on Darwin due to unlink system call returning a different error
code.
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/tests/io/fileutil/fileutiltest.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vespalib/src/tests/io/fileutil/fileutiltest.cpp b/vespalib/src/tests/io/fileutil/fileutiltest.cpp index b0a08f4e7fd..0aaa84c0585 100644 --- a/vespalib/src/tests/io/fileutil/fileutiltest.cpp +++ b/vespalib/src/tests/io/fileutil/fileutiltest.cpp @@ -297,7 +297,11 @@ TEST("require that vespalib::unlink works") TEST_FATAL("Should work on directories."); } catch (IoException& e) { //std::cerr << e.what() << "\n"; +#ifdef __APPLE__ + EXPECT_EQUAL(IoException::NO_PERMISSION, e.getType()); +#else EXPECT_EQUAL(IoException::ILLEGAL_PATH, e.getType()); +#endif } // Works for file { |