mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-05-07 10:22:42 +03:00
std.fs.test: fix file operations on directories on NetBSD
As noted earlier in this test, reading directories does not fail on NetBSD.
This commit is contained in:
+5
-3
@@ -845,9 +845,11 @@ test "file operations on directories" {
|
||||
defer handle.close(io);
|
||||
|
||||
// Reading from the handle should fail
|
||||
var buf: [1]u8 = undefined;
|
||||
try expectError(error.IsDir, handle.readStreaming(io, &.{&buf}));
|
||||
try expectError(error.IsDir, handle.readPositional(io, &.{&buf}, 0));
|
||||
if (native_os != .netbsd) {
|
||||
var buf: [1]u8 = undefined;
|
||||
try expectError(error.IsDir, handle.readStreaming(io, &.{&buf}));
|
||||
try expectError(error.IsDir, handle.readPositional(io, &.{&buf}, 0));
|
||||
}
|
||||
}
|
||||
try expectError(error.IsDir, ctx.dir.openFile(io, test_dir_name, .{ .allow_directory = false, .mode = .read_only }));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user