Skip chmodIfNeeded test on Windows

It doesn't do anything on Windows, it appears.
This commit is contained in:
John Ericson
2026-02-19 17:21:46 -05:00
parent 9b363e1e5c
commit 0730dcb4a8

View File

@@ -303,6 +303,9 @@ TEST(makeParentCanonical, root)
* chmodIfNeeded
* --------------------------------------------------------------------------*/
#ifndef _WIN32
// Windows doesn't support Unix-style permission bits - lstat always
// returns the same mode regardless of what chmod sets.
TEST(chmodIfNeeded, works)
{
auto [autoClose_, tmpFile] = nix::createTempFile();
@@ -318,6 +321,7 @@ TEST(chmodIfNeeded, works)
}
}
}
#endif
TEST(chmodIfNeeded, nonexistent)
{