aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-12-19 10:07:56 -0800
committerAndrew Kelley <andrew@ziglang.org>2025-12-23 22:15:11 -0800
commit018e34271fe58e540dc46e8bca529ce399625bef (patch)
tree280e3df33e81da7c5a09c6de567047498e286b83
parent3431f4503116e06b542eedf9c9bad6f769af3ebc (diff)
downloadzig-018e34271fe58e540dc46e8bca529ce399625bef.tar.gz
zig-018e34271fe58e540dc46e8bca529ce399625bef.zip
std.fs.test: fix rebase conflicts
-rw-r--r--lib/std/fs/test.zig15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/std/fs/test.zig b/lib/std/fs/test.zig
index e253aeeb54..19df1189fb 100644
--- a/lib/std/fs/test.zig
+++ b/lib/std/fs/test.zig
@@ -237,23 +237,24 @@ test "Dir.readLink" {
test "Dir.readLink on non-symlinks" {
try testWithAllSupportedPathTypes(struct {
fn impl(ctx: *TestContext) !void {
+ const io = ctx.io;
const file_path = try ctx.transformPath("file.txt");
- try ctx.dir.writeFile(.{ .sub_path = file_path, .data = "nonsense" });
+ try ctx.dir.writeFile(io, .{ .sub_path = file_path, .data = "nonsense" });
const dir_path = try ctx.transformPath("subdir");
- try ctx.dir.makeDir(dir_path);
+ try ctx.dir.makeDir(io, dir_path, .default_dir);
// file
- var buffer: [fs.max_path_bytes]u8 = undefined;
- try std.testing.expectError(error.NotLink, ctx.dir.readLink(file_path, &buffer));
+ var buffer: [Dir.max_path_bytes]u8 = undefined;
+ try std.testing.expectError(error.NotLink, ctx.dir.readLink(io, file_path, &buffer));
if (builtin.os.tag == .windows) {
- var file_path_w = try std.os.windows.sliceToPrefixedFileW(ctx.dir.fd, file_path);
+ var file_path_w = try std.os.windows.sliceToPrefixedFileW(ctx.dir.handle, file_path);
try std.testing.expectError(error.NotLink, ctx.dir.readLinkW(file_path_w.span(), &file_path_w.data));
}
// dir
- try std.testing.expectError(error.NotLink, ctx.dir.readLink(dir_path, &buffer));
+ try std.testing.expectError(error.NotLink, ctx.dir.readLink(io, dir_path, &buffer));
if (builtin.os.tag == .windows) {
- var dir_path_w = try std.os.windows.sliceToPrefixedFileW(ctx.dir.fd, dir_path);
+ var dir_path_w = try std.os.windows.sliceToPrefixedFileW(ctx.dir.handle, dir_path);
try std.testing.expectError(error.NotLink, ctx.dir.readLinkW(dir_path_w.span(), &dir_path_w.data));
}
}