From a62353fb4b3b060ff714824e5c105bcf73419e66 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 28 Dec 2020 22:15:07 -0700 Subject: [PATCH] fix `zig test` with regards to passing parameters --- src/main.zig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.zig b/src/main.zig index 6c32529a5e..3bf9934d85 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1833,7 +1833,13 @@ fn buildOutputType( }); } else { for (test_exec_args.items) |arg| { - try argv.append(arg orelse exe_path); + if (arg) |a| { + try argv.append(a); + } else { + try argv.appendSlice(&[_][]const u8{ + exe_path, self_exe_path, + }); + } } } if (runtime_args_start) |i| {