| author | |
| committer | |
| log | b5034bd7765565f838466d8b212140097a1eefba |
| tree | 054e9775ae3e45c4da13499dbada554a72af6b46 |
| parent | e9434ff8f46ec27a863d0b071c0a99b4f01588dc |
| parent | 539e90e26d86b7e8fbc81f069a062beb7a43edb3 |
| signature |
Print error when running `zig test/run` without a source file1 files changed, 4 insertions(+), 0 deletions(-)
src/main.zig+4| ... | ... | @@ -1210,6 +1210,10 @@ fn buildOutputType( |
| 1210 | 1210 | fatal("translate-c expects exactly 1 source file (found {})", .{c_source_files.items.len}); |
| 1211 | 1211 | } |
| 1212 | 1212 | |
| 1213 | if (root_src_file == null and (arg_mode == .zig_test or arg_mode == .run)) { | |
| 1214 | fatal("one zig source file is required to run this command", .{}); | |
| 1215 | } | |
| 1216 | ||
| 1213 | 1217 | const root_name = if (provided_name) |n| n else blk: { |
| 1214 | 1218 | if (arg_mode == .zig_test) { |
| 1215 | 1219 | break :blk "test"; |