Skip to content

Commit 30435a0

Browse files
committed
add a test for an invalid version
1 parent c98aac3 commit 30435a0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

build.zig

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,17 @@ fn addTests(
319319
.check = .{ .expect_stderr_match = "error: compiler '0.7.0' is not installed\n" },
320320
});
321321

322+
tests.addWithClean(.{
323+
.name = "test-invalid-version",
324+
.argv = &.{"this-version-is-not-valid"},
325+
.checks = &.{
326+
.{ .expect_stderr_match = "error: invalid zig version 'this-version-is-not-valid', unable to create a download URL for it\n" },
327+
},
328+
});
329+
322330
const non_existent_version = "0.0.99";
323331
tests.addWithClean(.{
324-
.name = "test-bad-version",
332+
.name = "test-valid-but-nonexistent-version",
325333
.argv = &.{non_existent_version},
326334
.checks = &.{
327335
.{ .expect_stderr_match = "error: could not download '" },

0 commit comments

Comments
 (0)