From f0dd14d81e7e68969da805d283549314d554d0aa Mon Sep 17 00:00:00 2001 From: Vernon Stinebaker Date: Tue, 29 Sep 2026 10:25:49 +0800 Subject: [PATCH] fix(tests): repair config.zig test after #5/#9 merge The #5 merge spliced its new host test onto #9's refactored test region, leaving pre-0.16 tmp.dir.writeFile/realpathAlloc forms that broke the build (and a duplicated cfg declaration in the transient text merge). Uses the std_compat.fs.Dir.wrap form, matching #9's other tests. 19/19 tests pass. --- src/config.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.zig b/src/config.zig index 6a7d8e7..1b716cd 100644 --- a/src/config.zig +++ b/src/config.zig @@ -112,7 +112,7 @@ test "loadFromFile keeps default host when unset" { var tmp = std.testing.tmpDir(.{}); defer tmp.cleanup(); - try tmp.dir.writeFile(.{ + try std_compat.fs.Dir.wrap(tmp.dir).writeFile(.{ .sub_path = "config.json", .data = \\{ @@ -121,7 +121,7 @@ test "loadFromFile keeps default host when unset" { , }); - const cfg_path = try tmp.dir.realpathAlloc(std.testing.allocator, "config.json"); + const cfg_path = try std_compat.fs.Dir.wrap(tmp.dir).realpathAlloc(std.testing.allocator, "config.json"); defer std.testing.allocator.free(cfg_path); var arena = std.heap.ArenaAllocator.init(std.testing.allocator);