fn testJoinMaybeZPosix(paths: []const []const u8, expected: []const u8, zero: bool) !void
fn testJoinMaybeZPosix(paths: []const []const u8, expected: []const u8, zero: bool) !void { const posixIsSep = struct { fn isSep(byte: u8) bool { return byte == '/'; } }.isSep; const actual = try joinSepMaybeZ(testing.allocator, sep_posix, posixIsSep, paths, zero); defer testing.allocator.free(actual); try testing.expectEqualSlices(u8, expected, if (zero) actual[0 .. actual.len - 1 :0] else actual); }