---
name: "zt_main"
section: "3"
platform: "linux"
package: "libzt-doc"
version: "0.3.1-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/zt_main"
---

# zt\_main(3)

command line interface for running tests

## NAME

**zt\_main** – command line interface for running tests

## SYNOPSIS

**#include \<zt.h\>**

*int*\

**zt\_main**(*int argc*, *char \*\*argv*, *char \*\*envp*, *zt\_test\_suite\_func tsuite*);

## DESCRIPTION

**zt\_main** takes familiar arguments as well as a single test suite function. Depending on command line arguments some or all tests are enumerated and printed or executed.

## RETURN VALUES

When tests are executed the return value is **EXIT\_SUCCESS** or **EXIT\_FAILURE**. If tests are only listed the return value is always **EXIT\_SUCCESS**.

## SEE ALSO

ZT\_VISIT\_TEST\_CASE(3), ZT\_VISIT\_TEST\_SUITE(3)

## HISTORY

**zt\_main** first appeared in libzt 0.1

## AUTHORS

Zygmunt Krynicki ⟨*me@zygoon.pl*⟩
