Add status codes

This commit is contained in:
JeremyStar™ 2024-03-28 18:10:08 +01:00
parent 3ec997211f
commit 70b1794129
2 changed files with 5 additions and 1 deletions

View file

@ -90,6 +90,8 @@ Use this command to test your project in the command line:
# └─────────────────────────────────── Tells Godot to not display a window. Omit if you strictly need a window.
```
The process will exit with code `0` on success (all tests except skipped onces passing), `1` with warnings (all tests either passing or throwing warnings except skipped ones) and `2` on failure (some tests failing).
## File structure
Here's a file structure for this project:
```plain

View file

@ -89,7 +89,9 @@ func _ready() -> void:
lresu("")
# Shutdown
terminate()
if stats_all == stats_ok: terminate(0)
elif stats_all == stats_ok + stats_warn: terminate(1)
else: terminate(2)
# Runs a test suite
func run_suite(suite: String) -> void: