On this page
test.TestServer.session
- Module
- test
- Declared in
- TestServer
- Package
- libtmux
- Source
- crates/libtmux/src/test.rs
-
Create a session on this fixture's server.
A test almost always wants a session before it wants anything else, and reaching through
TestServer::serverto say so is noise. Takes the same optionscrate::Server::new_sessiondoes, so a test that needs a start directory or a window name says it here rather than dropping back to the server.Errors
Returns the error tmux gave, including
crate::Error::SessionExistswhen the name is taken.Examples
let guard = libtmux::test::TestServer::new().await?; let session = guard.session("work").await?; assert_eq!(session.name().as_bytes(), b"work"); guard.shutdown().await?;
0 declared, 0 inherited