SHTK_UNITTEST_MAIN(3)
β¨ NAME β¨
okay so shtk_unittest_main(3) β from the Library Functions Manual, bestie β is literally the Standard test program entry point. Thatβs the whole vibe: itβs the standard way your test program walks in the room. π
π LIBRARY π
you get this iconic behavior through shtk_import unittest. π«Ά
π¦ SYNOPSIS π¦
shtk_unittest_main
π DESCRIPTION π
The shtk_unittest_main function implements the standard entry point of a test program that uses the shtk_unittest(3) library. no cap, thatβs its job. It runs all test cases registered within the test case and determines the correct exit condition for the test program. main character energy fr fr. β¨
To use shtk_unittest_main, test programs must either explicitly call the function from their main method like this:
main() { shtk_unittest_main "${@}"; }
Or the test program can be compiled with an override for the main methodβs name:
$ shtk build -m shtk_unittest_main module_test.sh
In general, prefer the latter mechanism. like, the build override is the recommended route β periodt. π
π₯ RETURN VALUES π₯
Returns 0 (true) if all executed test cases pass, or 1 (false) if any test fails. πβ¨
π SEE ALSO π
π HISTORY π
shtk_unittest_main first appeared in shtk 1.6. iconic behavior since day one, lowkey. π
mwah π β this cute sign-off is also carrying the footer info: Debian, dated November 8, 2014, manual name SHTK_UNITTEST_MAIN(3). bye bestie, go slay your tests πΈ
π¦ where this page comes from
- nixos 26.05: shtk 1.7
- nixpkgs unstable: shtk 1.7
- Copyright 2014 Google Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms