ReviewOS

also looking at this

zig-utils/zig-test-framework

test: make CI exercise maintained integrations

#18
Merged glennmichael123 wants to merge codex/issue-3-test-coverage into main
16 files +390 -139
src/compat.zigmodified+14-0
Changes to src/compat.zig
@@ -172,6 +172,20 @@ pub fn deleteFile(allocator: std.mem.Allocator, path: []const u8) !void {
172172 }
173173}
174174
175/// Delete an empty directory using POSIX APIs.
176/// Replaces std.fs.cwd().deleteDir().
177pub fn deleteDir(allocator: std.mem.Allocator, path: []const u8) !void {
178 const path_z = try allocator.dupeSentinel(u8, path, 0);
179 defer allocator.free(path_z);
180 const rc = std.c.rmdir(path_z);
181 if (rc != 0) {
182 switch (std.c.errno(rc)) {
183 .NOENT => return error.FileNotFound,
184 else => return error.Unexpected,
185 }
186 }
187}
188
175189/// Create directories recursively using POSIX APIs.
176190/// Replaces std.fs.cwd().makePath().
177191pub fn makePath(allocator: std.mem.Allocator, path: []const u8) !void {