toolchain version command

This commit is contained in:
2026-07-05 13:47:14 +02:00
parent e7f69ffb5a
commit 7ce3917c15
3 changed files with 34 additions and 1 deletions
+10
View File
@@ -2563,6 +2563,13 @@ build_command_is_recognized :: proc(t: ^testing.T) {
testing.expect(t, !is_build_command("--build"))
}
@(test)
version_command_is_recognized :: proc(t: ^testing.T) {
testing.expect(t, is_version_command("version"))
testing.expect(t, !is_version_command("--version"))
testing.expect(t, len(BROLANG_VERSION) > 0)
}
@(test)
build_subcommand_compiles_and_runs :: proc(t: ^testing.T) {
output := "examples/build/hello/build/hello"
@@ -2571,6 +2578,9 @@ build_subcommand_compiles_and_runs :: proc(t: ^testing.T) {
testing.expect_value(t, status, 0)
state := run_executable(output)
testing.expect_value(t, state.exit_code, 0)
status = compiler_core.run_build("examples/build/hello")
testing.expect_value(t, status, 0)
testing.expect(t, os.exists(output))
}
@(test)