allow filtering legacy tests, fix location tests, improve URLSearchParams

This commit is contained in:
Karl Seguin
2025-11-17 21:41:24 +08:00
parent c3ba39c80f
commit b8cc74f377
7 changed files with 51 additions and 19 deletions

View File

@@ -12,6 +12,15 @@ pub fn main() !void {
const allocator = gpa.allocator();
var args = try std.process.argsWithAllocator(allocator);
defer args.deinit();
_ = args.next(); // executable name
var filter: ?[]const u8 = null;
if (args.next()) |n| {
filter = n;
}
var http_server = try TestHTTPServer.init();
defer http_server.deinit();
@@ -52,6 +61,11 @@ pub fn main() !void {
if (!std.mem.endsWith(u8, entry.basename, ".html")) {
continue;
}
if (filter) |f| {
if (std.mem.indexOf(u8, entry.path, f) == null) {
continue;
}
}
std.debug.print("\n===={s}====\n", .{entry.path});
current_test = entry.path;
run(test_arena.allocator(), entry.path, session) catch |err| {