DaemonState
Whether a fixture's tmux daemon is still running, and how it ended if not.
Source and package
- Qualified name
-
libtmux::test:: Daemon State - Module
- test
- Package
- libtmux
- Source
- crates/libtmux/src/test.rs
-
Description#
A test drives tmux through tmux's own client, and that client reports a daemon that died as an ordinary refusal: it prints
server exited unexpectedlyand exits 1, the same shape as a command tmux rejected. An assertion written against the reply alone therefore blames the command.TestServer::daemon_state()answers the question the reply cannot.Examples#
use libtmux::test::{DaemonState, TestServer};let mut guard = TestServer::new().await?;assert_eq!(guard.daemon_state(), DaemonState::Running);guard.shutdown().await?;
Variants3#
| Case | Payload | Description |
|---|---|---|
| Gone | (std::process::ExitStatus) | The daemon has exited, with the status the kernel reported. |
| Running | No payload | The daemon has not exited. |
| Unreadable | No payload | The wait could not be made, so the daemon's fate is unknown. |
Members1#
- is_running method Whether the daemon has not exited.