aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/mod.rs
blob: bd5907791e711b50c90aee2f9c04cd1d5324bead (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
pub mod e2e;
pub mod fakes;
pub mod integration;
pub mod possible_tty_inputs;
pub mod tty_inputs;
pub mod utils;

use std::path::PathBuf;
use zellij_client::{os_input_output::ClientOsApi, start_client, ClientInfo};
use zellij_server::{os_input_output::ServerOsApi, start_server};
use zellij_utils::{
    cli::CliArgs,
    input::{config::Config, layout::Layout},
};

pub fn start(
    client_os_input: Box<dyn ClientOsApi>,
    opts: CliArgs,
    server_os_input: Box<dyn ServerOsApi>,
    config: Config,
    layout: Option<Layout>,
) {
    let server_thread = std::thread::Builder::new()
        .name("server_thread".into())
        .spawn(move || {
            start_server(server_os_input, PathBuf::from(""));
        })
        .unwrap();
    start_client(
        client_os_input,
        opts,
        config,
        ClientInfo::New("".into()),
        layout,
    );
    let _ = server_thread.join();
}