test.DaemonState
Rust
- Python Unavailable
- TypeScript Unavailable
- Rust
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- test
- Package
- libtmux
- Source
- crates/libtmux/src/test.rs
-
Whether a fixture's tmux daemon is still running, and how it ended if not.
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_stateanswers 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?;
4 declared, 0 inherited
Members
- Gone constant The daemon has exited, with the status the kernel reported.
- Running constant The daemon has not exited.
- Unreadable constant The wait could not be made, so the daemon's fate is unknown.
- is_running method Whether the daemon has not exited.