aboutsummaryrefslogtreecommitdiff
path: root/lib/std/posix/test.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-12-08 17:14:31 -0800
committerAndrew Kelley <andrew@ziglang.org>2025-12-23 22:15:08 -0800
commit950d18ef695bb7a28397e080dc3c201559ec4ee2 (patch)
tree253209139275932ed503a5ea4529594ab70df8cc /lib/std/posix/test.zig
parent314c906dba32e72317947a15254519b22745b13f (diff)
downloadzig-950d18ef695bb7a28397e080dc3c201559ec4ee2.tar.gz
zig-950d18ef695bb7a28397e080dc3c201559ec4ee2.zip
update all access() to access(io)
Diffstat (limited to 'lib/std/posix/test.zig')
-rw-r--r--lib/std/posix/test.zig12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/std/posix/test.zig b/lib/std/posix/test.zig
index 169c5a70c2..af17f1f9ff 100644
--- a/lib/std/posix/test.zig
+++ b/lib/std/posix/test.zig
@@ -376,7 +376,7 @@ test "mmap" {
const file = try tmp.dir.createFile(io, test_out_file, .{});
defer file.close(io);
- var stream = file.writer(&.{});
+ var stream = file.writer(io, &.{});
var i: usize = 0;
while (i < alloc_size / @sizeOf(u32)) : (i += 1) {
@@ -741,6 +741,8 @@ test "access smoke test" {
if (native_os == .windows) return error.SkipZigTest;
if (native_os == .openbsd) return error.SkipZigTest;
+ const io = testing.io;
+
var tmp = tmpDir(.{});
defer tmp.cleanup();
@@ -761,9 +763,9 @@ test "access smoke test" {
const file_path = try fs.path.join(a, &.{ base_path, "some_file" });
defer a.free(file_path);
if (native_os == .windows) {
- try posix.access(file_path, posix.F_OK);
+ try posix.access(io, file_path, posix.F_OK);
} else {
- try posix.access(file_path, posix.F_OK | posix.W_OK | posix.R_OK);
+ try posix.access(io, file_path, posix.F_OK | posix.W_OK | posix.R_OK);
}
}
@@ -771,7 +773,7 @@ test "access smoke test" {
// Try to access() a non-existent file - should fail with error.FileNotFound
const file_path = try fs.path.join(a, &.{ base_path, "some_other_file" });
defer a.free(file_path);
- try expectError(error.FileNotFound, posix.access(file_path, posix.F_OK));
+ try expectError(error.FileNotFound, posix.access(io, file_path, posix.F_OK));
}
{
@@ -786,7 +788,7 @@ test "access smoke test" {
const file_path = try fs.path.join(a, &.{ base_path, "some_dir" });
defer a.free(file_path);
- try posix.access(file_path, posix.F_OK);
+ try posix.access(io, file_path, posix.F_OK);
}
}