| ... | @@ -13,6 +13,12 @@ fn processArgs() void { | ... | @@ -13,6 +13,12 @@ fn processArgs() void { |
| 13 | const args = std.process.argsAlloc(&args_allocator.allocator) catch { | 13 | const args = std.process.argsAlloc(&args_allocator.allocator) catch { |
| 14 | @panic("Too many bytes passed over the CLI to the test runner"); | 14 | @panic("Too many bytes passed over the CLI to the test runner"); |
| 15 | }; | 15 | }; |
| | 16 | if (args.len != 2) { |
| | 17 | const self_name = if (args.len >= 1) args[0] else if (builtin.os.tag == .windows) "test.exe" else "test"; |
| | 18 | const zig_ext = if (builtin.os.tag == .windows) ".exe" else ""; |
| | 19 | std.debug.print("Usage: {s} path/to/zig{s}\n", .{ self_name, zig_ext }); |
| | 20 | @panic("Wrong number of command line arguments"); |
| | 21 | } |
| 16 | std.testing.zig_exe_path = args[1]; | 22 | std.testing.zig_exe_path = args[1]; |
| 17 | } | 23 | } |
| 18 | | 24 | |