also looking at this
feat: load strict JSON configuration files
#19
10 files
+249
-286
| @@ -242,6 +242,22 @@ pub fn build(b: *std.Build) void { | ||
| 242 | 242 | test_step.dependOn(&run_snapshot_usage_tests.step); |
| 243 | 243 | test_step.dependOn(&run_time_tests.step); |
| 244 | 244 | |
| 245 | // Exercise configuration through the real CLI. The second invocation | |
| 246 | // proves that an explicit CLI filter overrides the configured filter. | |
| 247 | const run_config_fixture = b.addRunArtifact(exe); | |
| 248 | run_config_fixture.addArgs(&.{ "--config", "tests/fixtures/zig-test.json" }); | |
| 249 | test_step.dependOn(&run_config_fixture.step); | |
| 250 | ||
| 251 | const run_config_override = b.addRunArtifact(exe); | |
| 252 | run_config_override.addArgs(&.{ "--config", "tests/fixtures/zig-test.json", "--filter", "unselected test fails" }); | |
| 253 | run_config_override.expectExitCode(1); | |
| 254 | test_step.dependOn(&run_config_override.step); | |
| 255 | ||
| 256 | const run_invalid_config = b.addRunArtifact(exe); | |
| 257 | run_invalid_config.addArgs(&.{ "--config", "tests/fixtures/invalid-zig-test.json" }); | |
| 258 | run_invalid_config.expectExitCode(2); | |
| 259 | test_step.dependOn(&run_invalid_config.step); | |
| 260 | ||
| 245 | 261 | // Examples |
| 246 | 262 | const basic_example = b.addExecutable(.{ |
| 247 | 263 | .name = "basic_example", |