Main
Main runs the one-call package lifecycle for tmuxtest. It prepares short temporary paths, redirects suiteEnvironment into them, clears the variables that select a server outside them, runs m, cleans registered servers, restores the environment, and returns the final status. It returns 2 without running m when the environment would still reach a server outside the suite.
Source and package
- Qualified name
-
tmuxtest.Main - Package
- tmuxtest
- Distribution
- github.com/libtmux/libtmux-go/tmux
- Source
- tmux/tmuxtest/harness.go
-
Description#
After m returns, Main scans the whole suite root for sockets and stops each server still answering on one with kill-server. Such a server is a test's leak: Main reports how many it found, without naming a path, and returns 1 even when every test passed. The root is kept while a server still answers in it. TestMain should return its result through
os.Exit.
Guides#
Pages that discuss Main.