ZT_MAIN(3)
β¨ zt_main β¨
okay bestie, gather round, because this is the command line interface for running tests and she is lowkey the moment π . she lives in the LOCAL</> manual, section 3, and honestly? iconic.
πΈ NAME πΈ
zt_main β the command line interface for running tests, fr fr π§
π SYNOPSIS π
#include <zt.h>
int
zt_main(int argc, char **argv, char **envp, zt_test_suite_func tsuite);
like. look at her. so clean. so powerful. π«Ά
π DESCRIPTION π
so zt_main takes all the familiar arguments you already know and love, plus one single test suite function β that's the tsuite bestie, she's the main character here π.
and then, depending on whatever you threw at it on the command line, it either:
- enumerates and prints some or all of the tests π, or
- actually executes some or all of them π₯
some. or all. depends on the args. the args decide. the args are the vibe check. periodt.
β RETURN VALUES β
here's the tea β:
- when tests are executed, the return value is
EXIT_SUCCESSorEXIT_FAILUREβ basically a pass/fail report card and you WILL be seeing it π - if the tests are only listed (no execution, just a lil peek π), the return value is always
EXIT_SUCCESS. always. no cap.
π¦ SEE ALSO π¦
go read these next, they're literally the besties:
ZT_VISIT_TEST_CASE(3)ZT_VISIT_TEST_SUITE(3)
iykyk π
π HISTORY π
zt_main first appeared in libzt 0.1 β a true OG, we stan a humble origin story π
π AUTHORS π
Zygmunt Krynicki <me@zygoon.pl> β thank you for your service, king π«‘π
no cap, that's the whole page. go run some tests bestie, you got this π β¨
and that's a wrap! this lil legend comes from libzt 0.3.1, dated January 12, 2020, and lives at zt_main(3) π bye bestie!! π§π
π¦ where this page comes from
- debian bookworm: libzt-doc 0.3.1-4 Β· LGPL-3.0-only
- debian trixie: libzt-doc 0.3.1-4 Β· LGPL-3.0-only
- ubuntu jammy: libzt-doc 0.3.1-4 Β· LGPL-3.0-only
- ubuntu noble: libzt-doc 0.3.1-4build1 Β· LGPL-3.0-only
- ubuntu questing: libzt-doc 0.3.1-4build1
- ubuntu resolute: libzt-doc 0.3.1-4build2 Β· LGPL-3.0-only
- ubuntu stonking: libzt-doc 0.3.1-4build2 Β· LGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms