Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

test.DaemonState

Rust
  • Python Unavailable
  • TypeScript Unavailable
  • Rust
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

View as Markdown

Module
test
Package
libtmux
Source
crates/libtmux/src/test.rs
enum test.DaemonState
enumoverload [source]
enumoverload [source]
enum test.DaemonState

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 unexpectedly and 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?;

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.
Esc

Type to search.