I am new to Odin (so far I like it very much by the way) and have a problem with the test runner not exiting when it fails on an out-of-bound check.
I have created a very simple case to demonstrate:
package main
// Out of bound error to demonstrate problem with test.
last :: proc(a: []int) -> int {
return a[len(a)]
}
import "core:testing"
@(test)
test_last ::proc(t: ^testing.T) {
a := [?]int{1, 2, 3}
r := last(a[:])
testing.expect_value(t, r, 3)
}
When I run the test odin test ., I get the following output but the test runner never exit. I have to ctrl-C twice to get back control.
I tried to go through the test runner command line options and searched quickly through this forum and the discord forum but couldn’t find an answer. Am I missing a test runner command line option, or a compiler directive? I have tried odin-macos-arm64-nightly+2025-10-05 and odin-macos-arm64-nightly+2025-11-04 with the same result.
Any help is appreciated.
Output from the test runner (not returning to the shell at the end.
➜ scratch odin test .
[INFO ] --- [2025-11-27 03:14:28] Starting test runner with 1 thread. Set with -define:ODIN_TEST_THREADS=n.
[INFO ] --- [2025-11-27 03:14:28] The random seed sent to every test is: 75933603369649. Set with -define:ODIN_TEST_RANDOM_SEED=n. [INFO ] --- [2025-11-27 03:14:28] Memory tracking is enabled. Tests will log their memory usage if there's an issue. [INFO ] --- [2025-11-27 03:14:28] < Final Mem/ Total Mem> < Peak Mem> (#Free/Alloc) :: [package.test_name]
main [| ] 0/ 1 :: test_last 1 thread 0/ 1 :: total
^C^C
➜ scratch