id
stringlengths
20
30
source
stringclasses
1 value
chunk_index
int64
0
520k
token_count
int32
154
512
content
stringlengths
185
57.5k
rust_dataset_chunk_511900
rust_dataset.txt
511,900
512
waited ); } #[test] fn a_registry_that_keeps_changing_outlives_the_no_progress_tier_and_stops_at_the_hard_cap() { let shared_ptys = SharedPtys::default(); let stop = StdArc::new(AtomicBool::new(false)); let mutating = { let shared_ptys = shared_ptys.c...
rust_dataset_chunk_511901
rust_dataset.txt
511,901
512
, ServerToClientMsg, }; use zellij_utils::shared::default_palette; use crate::fake_pty::{SharedPtys, FAKE_PID_BASE}; #[derive(Clone)] struct NonBlockingClientSender { buffer_tx: crossbeam::channel::Sender<ServerToClientMsg>, } impl NonBlockingClientSender { fn new(mut ipc_sender: IpcSenderWithContext<ServerT...
rust_dataset_chunk_511902
rust_dataset.txt
511,902
512
().unwrap(); if cached_resizes.is_none() { *cached_resizes = Some(BTreeMap::new()); } } fn apply_cached_resizes(&mut self) { let cached_resizes = self.cached_resizes.lock().unwrap().take(); for (terminal_id, (cols, rows)) in cached_resizes.unwrap_or_default() { ...
rust_dataset_chunk_511903
rust_dataset.txt
511,903
512
_terminal_id: u32) -> Result<()> { Ok(()) } fn kill(&self, pid: u32) -> Result<()> { self.shared_ptys .exit_terminal(pid.saturating_sub(FAKE_PID_BASE), None); Ok(()) } fn force_kill(&self, pid: u32) -> Result<()> { self.shared_ptys .exit_terminal(...
rust_dataset_chunk_511904
rust_dataset.txt
511,904
512
self, panes: &[(u32, u32)], _post_hook: &Option<String>, ) -> HashMap<u32, Vec<String>> { self.shared_ptys.mutate(|registry| { panes .iter() .filter_map(|(terminal_id, _)| { let state = registry.fake_pty_states.get_mut(terminal_...
rust_dataset_chunk_511905
rust_dataset.txt
511,905
512
(1)) }, ); terminal } fn enter_pane_mode_and_wait_for_status_bar(zellij: &TestSession) { zellij.send_stdin(&keys::ctrl('p')); zellij.wait_until("status bar shows pane mode", |grid_snapshot| { grid_snapshot.contains("<p> PANE") && grid_snapshot.contains("Fullscreen") ...
rust_dataset_chunk_511906
rust_dataset.txt
511,906
512
mouse_mode true"; pub fn open_inbox(zellij: &TestSession) -> GridSnapshot { zellij.send_stdin(&keys::INBOX_KEY); let opened = zellij.wait_until("the session manager opens", |grid_snapshot| { shows_inbox(grid_snapshot) || grid_snapshot.contains(SESSIONS_HELP) }); if shows_inbox(&opened) { ...
rust_dataset_chunk_511907
rust_dataset.txt
511,907
512
_bytes(&self, bytes: &[u8]); } impl TypesKeys for TestSession { fn type_bytes(&self, bytes: &[u8]) { self.send_stdin(bytes); } } impl TypesKeys for TestClient { fn type_bytes(&self, bytes: &[u8]) { self.send_stdin(bytes); } } pub fn press_esc(client: &impl TypesKeys) { client.type...
rust_dataset_chunk_511908
rust_dataset.txt
511,908
512
0x1f] } pub const fn alt(character: char) -> [u8; 2] { [ESC_BYTE, character as u8] } pub const fn key(character: char) -> [u8; 1] { [character as u8] } pub const ENTER: [u8; 1] = [b'\r']; pub const ALT_ENTER: [u8; 2] = [ESC_BYTE, b'\r']; pub const ALT_ENTER_KITTY: [u8; 7] = *b"\x1b[13;3u"; pub const ESC: [u...
rust_dataset_chunk_511909
rust_dataset.txt
511,909
512
u8; 6] = *b"\x1b[1;2F"; pub const PAGE_UP: [u8; 4] = *b"\x1b[5~"; pub const PAGE_DOWN: [u8; 4] = *b"\x1b[6~"; pub const DELETE: [u8; 4] = *b"\x1b[3~"; pub fn sgr_click(column: usize, row: usize) -> Vec<u8> { format!( "\u{1b}[<0;{};{}M\u{1b}[<0;{};{}m", column + 1, row + 1, column + ...
rust_dataset_chunk_511910
rust_dataset.txt
511,910
512
10)) } pub fn wait_for(what: &str, mut check: impl FnMut() -> bool) { let deadline = std::time::Instant::now() + default_timeout(); while !check() { if std::time::Instant::now() >= deadline { panic!("timed out waiting for {}", what); } std::thread::sleep(Duration::from_milli...
rust_dataset_chunk_511911
rust_dataset.txt
511,911
512
()).max().unwrap_or(0); if guest_rows == 0 || guest_cols == 0 || guest_rows > host_rows || guest_cols > host_cols { return false; } for row_offset in 0..=(host_rows - guest_rows) { 'next_column_offset: for col_offset in 0..=(host_cols - guest_cols) { for (guest_row, guest_line) i...
rust_dataset_chunk_511912
rust_dataset.txt
511,912
512
}) } pub const GUEST_PING_INTERVAL_MS: u64 = 100; pub const GUEST_PONG_TIMEOUT_MS: u64 = 4000; #[derive(Clone, Default)] pub struct FrameLog { inner: Arc<FrameLogInner>, } #[derive(Default)] struct FrameLogInner { messages: Mutex<Vec<NestedSessionMessage>>, signal: Condvar, } impl FrameLog { fn pus...
rust_dataset_chunk_511913
rust_dataset.txt
511,913
512
pub host: TestSession, pub guest: TestSession, pub host_pane: FakePtyHandle, guest_to_host: FrameLog, host_to_guest: FrameLog, frozen: Arc<AtomicBool>, _forwarders: Vec<JoinHandle<()>>, } fn set_nested_timing_env() { std::env::set_var( "ZELLIJ_NESTED_PING_INTERVAL_MS", G...
rust_dataset_chunk_511914
rust_dataset.txt
511,914
512
_to_guest.clone()), spawn_pane_resize_to_guest(host_pane.clone(), guest_resizer, guest_cols, guest_rows), ]; GuestBridge { guest, guest_to_host, host_to_guest, forwarders, } } impl NestedHarness { pub fn start(host_size: Size) -> Self { Self::start_with_...
rust_dataset_chunk_511915
rust_dataset.txt
511,915
512
panes", |message| matches!(message, NestedSessionMessage::AnnounceAck { .. }), ); } pub fn wait_for_host_to_ping_guest(&self) { self.host_to_guest.wait_for( "the outer (host) session to ping the guest running inside its pane to check it is still alive", |mes...
rust_dataset_chunk_511916
rust_dataset.txt
511,916
512
outer (host) session to ascend back out of the guest pane and take its client's keys back", |message| matches!(message, NestedSessionMessage::FocusLost), ); } pub fn wait_for_guest_to_request_host_focus(&self) { self.wait_for_guest_to_request_host_focus_after(0); } pub fn ...
rust_dataset_chunk_511917
rust_dataset.txt
511,917
512
\ the host never noticed the guest was gone and cleared it \ (pings before={pings_before}, after={pings_after})", ); } } } } pub struct NestedDepthThreeHarness { pub outer: TestSession, pub middle: TestSession, pub inner: Te...
rust_dataset_chunk_511918
rust_dataset.txt
511,918
512
Log { &self.middle_to_inner } pub fn inner_to_middle_frames(&self) -> &FrameLog { &self.inner_to_middle } pub fn wait_for_outer_to_descend_into_middle(&self) { self.outer_to_middle.wait_for( "the outer host to descend into the middle guest pane", |messag...
rust_dataset_chunk_511919
rust_dataset.txt
511,919
512
: usize) { self.middle_to_inner.wait_for_after( since, "the middle guest to descend back into the inner guest pane", |message| matches!(message, NestedSessionMessage::FocusGained { .. }), ); } pub fn mark_outer_to_middle(&self) -> usize { self.outer_t...
rust_dataset_chunk_511920
rust_dataset.txt
511,920
512
{ continue; } let (_residue, payloads) = extractor.extract(&bytes); for payload in payloads { if let Some(message) = decode_payload(&payload) { log.push(message); } } ...
rust_dataset_chunk_511921
rust_dataset.txt
511,921
512
}; use zellij_utils::input::options::Options; use zellij_utils::pane_size::Size; use zellij_utils::setup::Setup; use crate::client_screen::{GridSnapshot, HostTerminal}; use crate::deadline::{ProgressDeadline, SERIALIZATION_PROGRESS}; use crate::fake_client_os_api::{FakeClientHandle, FakeClientOsApi}; use crate::fake_p...
rust_dataset_chunk_511922
rust_dataset.txt
511,922
512
, layout: LayoutInfo) -> Self { self.layout = Some(layout); self } pub fn with_initial_command(mut self, command: &[&str]) -> Self { let mut command: Vec<String> = command.iter().map(|part| part.to_string()).collect(); let run_command_action = RunCommandAction { comm...
rust_dataset_chunk_511923
rust_dataset.txt
511,923
512
.shared_ptys.wait_for( "the background session to start its first terminal", |fake_pty_registry| (!fake_pty_registry.fake_pty_states.is_empty()).then_some(()), ); drop(fake_client_handle); crate::wait_for("the server to release the detaching client", || { sess...
rust_dataset_chunk_511924
rust_dataset.txt
511,924
512
.unwrap_or(if self.stdout_tap.is_some() { HostTerminal::Manual } else { HostTerminal::Basic }); fake_client_handle .client_screen .set_host_terminal(host_terminal, fake_client_handle.stdin_tx.clone()); if let Some(stdout_tap) = self.stdout_...
rust_dataset_chunk_511925
rust_dataset.txt
511,925
512
) -> TestClient { let (fake_client_os_api, fake_client_handle) = FakeClientOsApi::new(size, None); let thread = spawn_client_thread( fake_client_os_api, self.session_context.cli_args.clone(), self.session_context.config.clone(), self.session_context.config...
rust_dataset_chunk_511926
rust_dataset.txt
511,926
512
_thread: &Arc<Mutex<Option<JoinHandle<()>>>>, ) -> Box<dyn FnOnce(std::path::PathBuf) + Send> { let server_thread = server_thread.clone(); Box::new(move |socket_path: std::path::PathBuf| { let install_panic_hook = false; let join_handle = std::thread::Builder::new() .name("in_process...
rust_dataset_chunk_511927
rust_dataset.txt
511,927
512
> { layout .match_indices("contents_file=\"") .filter_map(|(start, marker)| { let rest = &layout[start + marker.len()..]; rest.find('"').map(|end| &rest[..end]) }) } fn spawn_client_thread( fake_client_os_api: FakeClientOsApi, cli_args: CliArgs, config: z...
rust_dataset_chunk_511928
rust_dataset.txt
511,928
512
ached_and_exit, switch_context, ) }) .unwrap() } pub struct TestClient { fake_client_handle: FakeClientHandle, thread: Option<JoinHandle<Option<ConnectToSession>>>, } #[derive(Clone)] pub struct GuestResizer { size: Arc<Mutex<Size>>, signal_tx: crossbeam::ch...
rust_dataset_chunk_511929
rust_dataset.txt
511,929
512
_finished()) .unwrap_or(true) } pub fn wait_for_client_to_exit(mut self) { self.join(); } pub fn quit(mut self) { self.send_stdin(&keys::ctrl('q')); self.join(); } pub fn detach(mut self) { self.send_stdin(&keys::ctrl('o')); self.send_stdin(...
rust_dataset_chunk_511930
rust_dataset.txt
511,930
512
_slot: bool, } pub struct CliClientHandle { thread: JoinHandle<i32>, } impl CliClientHandle { pub fn wait_for_exit(self) -> i32 { self.thread.join().expect("cli client thread panicked") } } pub struct CliOutputHandle { thread: JoinHandle<i32>, fake_client_handle: FakeClientHandle, } #[de...
rust_dataset_chunk_511931
rust_dataset.txt
511,931
512
beam::channel::unbounded(); sender.send(text.as_bytes().to_vec()).unwrap(); drop(sender); self.with_stdin(receiver) } } impl TestSession { pub fn session_name(&self) -> &str { &self.session_name } /// The session id: the socket/pipe filename and the session-info cache f...
rust_dataset_chunk_511932
rust_dataset.txt
511,932
512
loop { let grid_snapshot = self.snapshot(); if predicate(&grid_snapshot) { return grid_snapshot; } if std::time::Instant::now() >= deadline { panic!( "timed out waiting for: {}\nlast rendered grid:\n{}", ...
rust_dataset_chunk_511933
rust_dataset.txt
511,933
512
_handle) = FakeClientOsApi::new(size, None); let thread = spawn_client_thread( fake_client_os_api, self.cli_args.clone(), self.config.clone(), self.config_options.clone(), ClientInfo::Attach(self.session_name.clone(), self.config_options.clone()), ...
rust_dataset_chunk_511934
rust_dataset.txt
511,934
512
spawn(move || { zellij_client::cli_client::start_cli_client( Box::new(fake_client_os_api), &session_name, actions, ) }) .unwrap() } fn cli_os_api(&self, caller: CliCaller) -> (FakeClientOsApi, Fa...
rust_dataset_chunk_511935
rust_dataset.txt
511,935
512
_name = self.session_name.clone(); let thread = std::thread::Builder::new() .name("in_process_events_client".to_string()) .spawn(move || { zellij_client::cli_client::start_events_client( Box::new(fake_client_os_api), &session_name, ...
rust_dataset_chunk_511936
rust_dataset.txt
511,936
512
ipped(now) { panic!( "timed out waiting for session serialization at {}\n{}", layout_path.display(), tripped ); } std::thread::sleep( deadline .remaining(now) ...
rust_dataset_chunk_511937
rust_dataset.txt
511,937
512
Session, ) -> (ConnectToSession, BackgroundTestSession) { let connect_to_session = self .main_client .join() .expect("the client exited without switching sessions"); assert_eq!( connect_to_session.name.as_deref(), Some(target.session_name()...
rust_dataset_chunk_511938
rust_dataset.txt
511,938
512
OsApi::default(); let server_thread: Arc<Mutex<Option<JoinHandle<()>>>> = Arc::new(Mutex::new(None)); let server_spawner = in_process_server_spawner(fake_server_os_api.clone(), &server_thread); let (fake_client_os_api, fake_client_handle) = FakeClientOsApi::new(self.size, Some(server...
rust_dataset_chunk_511939
rust_dataset.txt
511,939
512
(new_pane_cli_action( command, floating, close_on_exit, false, block_until_exit, )), } } pub fn join_main_client(&mut self) -> Option<ConnectToSession> { self.main_client.join() } pub fn wait_fo...
rust_dataset_chunk_511940
rust_dataset.txt
511,940
512
self) { let _ = self .main_client .fake_client_handle .stdin_tx .send(keys::ctrl('q').to_vec()); } } impl Drop for TestSession { fn drop(&mut self) { if self.main_client.thread.is_some() { self.send_quit_without_joining(); } ...
rust_dataset_chunk_511941
rust_dataset.txt
511,941
512
0b0}]? ?(?:{}) ?[\u{e0b0}]?[ ]*\n", swap_layout_name )) .unwrap(); let text = normal_mode.replace_all(text, "\n"); let text = tmux_mode_1.replace_all(&text, "\n"); let text = tmux_mode_2.replace_all(&text, "\n"); tab_bar.replace_all(&text, "\n").to_string() } fn strip_trailing_whitespac...
rust_dataset_chunk_511942
rust_dataset.txt
511,942
512
() .create(true) .write(true) .open(process_lock_path(parent, std::process::id())) .unwrap(); lock_file.lock().unwrap(); let _ = OWN_PROCESS_LOCK.set(lock_file); } fn remove_roots_of_dead_test_processes(parent: &Path) { let Ok(entries) = std::fs::read_dir(parent) else { ...
rust_dataset_chunk_511943
rust_dataset.txt
511,943
512
env::remove_var("DISPLAY"); std::env::remove_var("WAYLAND_DISPLAY"); let _ = std::fs::remove_file(&path); } else if !path.exists() { let _ = zellij_utils::desktop_integration::update(|state| { state.set(zellij_utils::desktop_integration::Flag::SetupNeverShow); }); } }...
rust_dataset_chunk_511944
rust_dataset.txt
511,944
512
queue_dir: queue_dir.to_path_buf(), name, _ticket_file: ticket_file, } } fn is_first_in_line(&self) -> bool { let Ok(entries) = std::fs::read_dir(&self.queue_dir) else { return true; }; let mut earlier: Vec<String> = entries .flat...
rust_dataset_chunk_511945
rust_dataset.txt
511,945
512
ell false mouse_mode false advanced_mouse_actions false pane_frame_style "titles" theme "default" session_indicator false attention { startup_card "never"; } swap_layout_notification false on_quit "quit" "#; pub fn default_test_options() -> zellij_utils::input::options::Options { zellij_utils::input::config::Confi...
rust_dataset_chunk_511946
rust_dataset.txt
511,946
512
Handle, Size, TestRunner, TestSession, PROMPT, TERMINAL_SIZE, }; const PIN_MARKER: &str = "PIN [ ]"; fn start_zellij_with_startup_tip() -> (TestSession, FakePtyHandle) { let zellij = TestRunner::new(TERMINAL_SIZE) .with_config("show_startup_tips true") .start(); let terminal = zellij.expect_pt...
rust_dataset_chunk_511947
rust_dataset.txt
511,947
512
Event}; use zellij_utils::data::PaneId; use zellij_utils::input::actions::Action; const LIMIT: Duration = Duration::from_secs(10); const SETTLE: Duration = Duration::from_millis(2500); fn wait_for(what: &str, mut check: impl FnMut() -> bool) { let deadline = Instant::now() + LIMIT; while !check() { if...
rust_dataset_chunk_511948
rust_dataset.txt
511,948
512
shown(&probe, &id); assert_eq!( notifications.len(), 1, "one notification per item, never stacked: {:?}", probe.events() ); let (title, body) = &notifications[0]; assert!(title.starts_with(&session), "{}", title); assert!(body.contains("Allow edit to main.rs?"), "{}"...
rust_dataset_chunk_511949
rust_dataset.txt
511,949
512
.send_client_msg( zellij_utils::ipc::ClientToServerMsg::HostTerminalFocusChanged { focused }, ) .expect("the focus change is sent"); } } fn failed_command(terminal: &zellij_integration_tests::FakePtyHandle) { terminal.output( b"\x1b]133;A\x1b\\$ \x1b]...
rust_dataset_chunk_511950
rust_dataset.txt
511,950
512
_command(&terminal); std::thread::sleep(SETTLE); assert!( shown(&probe, &id).is_empty(), "a pane in a focused window was notified: {:?}", probe.events() ); } --- FILE: zellij/zellij-integration-tests/tests/app_panel.rs --- #![cfg(unix)] use base64::engine::general_purpose::STANDAR...
rust_dataset_chunk_511951
rust_dataset.txt
511,951
512
: Vec<String> = zellij_utils::sessions::get_sessions() .unwrap() .into_iter() .map(|(name, _)| name) .collect(); assert!( !listed.iter().any(|name| name == APP_PANEL_SESSION), "the panel session is hidden from session lists: {:?}", listed ); panel.send...
rust_dataset_chunk_511952
rust_dataset.txt
511,952
512
┌'), "the panel draws no zellij frame: {}", grid_snapshot.lines()[0] ); panel.send_stdin(&keys::ctrl('g')); panel.send_stdin(&keys::ctrl('t')); panel.send_stdin(&keys::key('n')); std::thread::sleep(Duration::from_millis(500)); let after = panel.snapshot(); assert!( !a...
rust_dataset_chunk_511953
rust_dataset.txt
511,953
512
)); panel.send_stdin(&keys::ENTER); let switched = panel .join_main_client() .expect("confirming asks the app to quit"); assert_eq!( switched.name.as_deref(), Some(zellij_utils::consts::APP_QUIT_REQUEST) ); } #[test] fn exited_sessions_are_collapsed_under_one_line_in_the...
rust_dataset_chunk_511954
rust_dataset.txt
511,954
512
(view.to_owned()), args: None, plugin: None, plugin_id: None, configuration: None, launch_new: false, skip_cache: false, floating: None, in_place: None, cwd: None, pane_title: None, }], ) ...
rust_dataset_chunk_511955
rust_dataset.txt
511,955
512
unwrap_or_else(|| panic!("{:?} is not listed:\n{}", needle, grid_snapshot.text)); let column = lines[row][..lines[row].find(needle).unwrap()] .chars() .count(); (column, row) } fn is_selected(grid_snapshot: &zellij_integration_tests::GridSnapshot, needle: &str) -> bool { if !grid_snapshot.c...
rust_dataset_chunk_511956
rust_dataset.txt
511,956
512
}); panel.send_stdin(&keys::ESC); assert!(panel.join_main_client().is_none()); } #[test] fn after_any_input_the_automatic_panel_stays_where_it_is() { let background = TestRunner::new(TERMINAL_SIZE) .skip_concurrency_slot() .start_in_background(); let terminal = background.expect_pty...
rust_dataset_chunk_511957
rust_dataset.txt
511,957
512
_snapshot) && !grid_snapshot.contains("Quit Zellij and stop all sessions?") }); panel.send_stdin(&keys::ESC); assert!(panel.join_main_client().is_none()); } #[test] fn asking_for_an_empty_inbox_opens_it_until_tab_is_pressed() { let background = TestRunner::new(TERMINAL_SIZE) .skip_concurrency_s...
rust_dataset_chunk_511958
rust_dataset.txt
511,958
512
panel.send_stdin(&keys::RIGHT); panel.wait_until("right opens the group", |grid_snapshot| { grid_snapshot.contains("▾ Exited (2)") && is_selected(grid_snapshot, "Exited (2)") }); panel.send_stdin(&keys::RIGHT); wait_for_selected(&panel, "gone-one"); panel.send_stdin(LEFT); wait_for_s...
rust_dataset_chunk_511959
rust_dataset.txt
511,959
512
_snapshot| { grid_snapshot.contains("▾ Exited (1)") && grid_snapshot.contains("gone-two") && !grid_snapshot.contains("gone-one") }, ); for _ in 0..3 { panel.send_stdin(BACKSPACE); } panel.wait_until("clearing the search folds the group", |grid_...
rust_dataset_chunk_511960
rust_dataset.txt
511,960
512
.contains("This will delete all 4 exited sessions") && grid_snapshot.contains("Are you sure? (y/n)") }); panel.send_stdin(&keys::key('n')); panel.wait_until("no cancels", |grid_snapshot| { grid_snapshot.contains("▸ Exited (1)") && !grid_snapshot.contains("Are you sure") }); asser...
rust_dataset_chunk_511961
rust_dataset.txt
511,961
512
::ctrl('r')); std::thread::sleep(Duration::from_millis(500)); let after = panel.snapshot(); assert_eq!(before, after.text, "a key changed the screen on the header"); for name in ["gone-one", "gone-two"] { assert!(zellij_utils::consts::session_info_folder_for_session(name) .join("sess...
rust_dataset_chunk_511962
rust_dataset.txt
511,962
512
live_column + 2, "exited sessions are indented one level:\n{}", grid_snapshot.text ); let lines = grid_snapshot.lines(); let folder_column = |row: usize| { let line = &lines[row]; line[..line.find('—').unwrap()].chars().count() }; let (header_folder_column, _) = list...
rust_dataset_chunk_511963
rust_dataset.txt
511,963
512
.contains(ITEM_ACTIONS) }); panel.send_stdin(&keys::ESC); assert!(panel.join_main_client().is_none()); } #[test] fn leaving_an_empty_inbox_asked_for_keeps_the_panel_on_the_sessions() { let background = TestRunner::new(TERMINAL_SIZE) .skip_concurrency_slot() .start_in_background(); l...
rust_dataset_chunk_511964
rust_dataset.txt
511,964
512
" ); std::thread::sleep(Duration::from_millis(50)); } zellij_utils::session_link::send_actions_to_session( &name, vec![zellij_utils::input::actions::Action::MutePaneByPaneId { pane_id: zellij_utils::data::PaneId::Terminal(terminal.terminal_id()), }], ) ...
rust_dataset_chunk_511965
rust_dataset.txt
511,965
512
(1)") && grid_snapshot.contains("Deploy now") }); panel.send_stdin(&keys::ESC); assert!(panel.join_main_client().is_none()); } fn start_panel_sized( view: &str, size: zellij_integration_tests::Size, ) -> zellij_integration_tests::TestSession { TestRunner::new(size) .with_session_name(A...
rust_dataset_chunk_511966
rust_dataset.txt
511,966
512
("the sessions are shown", |grid_snapshot| { grid_snapshot.contains("<F1> all keys") }); zellij.send_stdin(&keys::F1); let all_keys = zellij.wait_until("all keys are listed", |grid_snapshot| { grid_snapshot.contains("All keys") && grid_snapshot.contains("<Ctrl r>") }); assert!( ...
rust_dataset_chunk_511967
rust_dataset.txt
511,967
512
.wait_until("the list shows a more marker", |grid_snapshot| { grid_snapshot.contains("Inbox (4)") && grid_snapshot.contains("more") }); panel.send_stdin(&keys::ESC); assert!(panel.join_main_client().is_none()); } #[test] fn after_reopening_the_panel_unfocused_hover_marks_the_name_and_the_first_clic...
rust_dataset_chunk_511968
rust_dataset.txt
511,968
512
background = TestRunner::new(TERMINAL_SIZE) .skip_concurrency_slot() .start_in_background(); leave_older_exited_sessions(&[]); let live = background.session_name().to_owned(); let mut panel = start_panel_on("sessions"); let grid_snapshot = panel.wait_until("the sessions are listed", |gr...
rust_dataset_chunk_511969
rust_dataset.txt
511,969
512
"show_startup_tips false\nshow_release_notes false\npane_frames false\nattention {\n tray_badge_colors {\n needs_you \"#8e4ec6\"\n }\n}", ) .with_layout(LayoutInfo::Stringified(panel_layout("inbox"))) .start(); let purple = Some(zellij_integration_tests::client_screen::AnsiCode...
rust_dataset_chunk_511970
rust_dataset.txt
511,970
512
bind "Alt F7" { SwitchToMode "Session"; } bind "Ctrl F8" { Quit; } } } "#; #[test] fn exit_zellij() { let zellij = TestRunner::new(TERMINAL_SIZE).start(); claim_first_terminal_and_wait_for_prompt(&zellij); zellij.send_stdin(&keys::ctrl('q')); zellij.wait_until("zellij said goodbye...
rust_dataset_chunk_511971
rust_dataset.txt
511,971
512
1b[16t"; client_stdout_bytes .windows(pixel_size_query.len()) .filter(|window| window == pixel_size_query) .count() } #[test] fn status_bar_loads_custom_keybindings() { let zellij = TestRunner::new(TERMINAL_SIZE) .with_config(CHANGED_KEYS_CONFIG) .start(); let termin...
rust_dataset_chunk_511972
rust_dataset.txt
511,972
512
ROLLBACK") && grid_snapshot.contains("SCROLLBACK_MARKER_ONE") && grid_snapshot.contains("SCROLLBACK_MARKER_TWO") && grid_snapshot.status_bar_appears() }); assert_snapshot!(normalized(&grid_snapshot)); zellij.quit(); } --- FILE: zellij/zellij-integration-tests/tests/app_...
rust_dataset_chunk_511973
rust_dataset.txt
511,973
512
); } let _ = write_reply(&mut stream, &AppReply::Done); } }); received } fn session_with_an_item(text: &str) -> BackgroundTestSession { let background = TestRunner::new(TERMINAL_SIZE) .with_config("session_indicator true") .skip_concurrency_slot() .st...
rust_dataset_chunk_511974
rust_dataset.txt
511,974
512
#[test] fn stopping_all_sessions_ends_every_listed_session_and_only_those() { let first = TestRunner::new(TERMINAL_SIZE) .skip_concurrency_slot() .start_in_background(); let second = TestRunner::new(TERMINAL_SIZE) .skip_concurrency_slot() .start_in_background(); let kept = Te...
rust_dataset_chunk_511975
rust_dataset.txt
511,975
512
collect(); assert!(resurrectable.contains(&"exited".to_owned())); assert!( !resurrectable.iter().any(|name| name.starts_with('.')), "{:?}", resurrectable ); let names = zellij_utils::sessions::get_resurrectable_session_names(); assert!(names.contains(&"exited".to_owned())); ...
rust_dataset_chunk_511976
rust_dataset.txt
511,976
512
second): {:?}\n=== zellij log tail ===\n{}", report, zellij_integration_tests::test_env::log_tail(40) ); } std::thread::sleep(Duration::from_millis(50)); } for session in [&first, &second] { wait_for("a detached session to keep answering", || ...
rust_dataset_chunk_511977
rust_dataset.txt
511,977
512
_session_named_in_full_resolves_to_an_attach() { let mut zellij = start_named_session(); let session_name = zellij.session_name().to_owned(); match resolved(&named(Some(&session_name))) { Ok(ClientInfo::Attach(name, _)) => assert_eq!(name, session_name), other => panic!("a live session reso...
rust_dataset_chunk_511978
rust_dataset.txt
511,978
512
resolved to {:?}", other.map(described) ), } zellij.resurrect(TERMINAL_SIZE); zellij.wait_until("the resurrected session is up", |grid_snapshot| { grid_snapshot.contains("alpha") && grid_snapshot.status_bar_appears() }); zellij.quit(); } #[test] fn an_unknown_name_is_r...
rust_dataset_chunk_511979
rust_dataset.txt
511,979
512
ix)] use base64::engine::general_purpose::STANDARD; use base64::Engine as _; use std::time::{Duration, Instant}; use zellij_integration_tests::{ claim_first_terminal_and_wait_for_prompt, col, keys, split_right_and_wait_for_prompt, FakePtyHandle, HostTerminal, TestRunner, TestSession, TERMINAL_SIZE, }; use zell...
rust_dataset_chunk_511980
rust_dataset.txt
511,980
512
p')); zellij.send_stdin(&keys::key('l')); zellij.send_stdin(&keys::ENTER); zellij.wait_until("focus moved to the right pane", |grid_snapshot| { grid_snapshot.status_bar_appears() && grid_snapshot .cursor .map(|cursor| cursor.x >= 60) .unwra...
rust_dataset_chunk_511981
rust_dataset.txt
511,981
512
|grid_snapshot| { grid_snapshot.status_bar_appears() && grid_snapshot.cursor_is_at(col(62).row(13)) }, ); terminal } fn watch(zellij: &TestSession, terminal: &FakePtyHandle) { zellij.run_cli_action(CliAction::WatchPane { pane_id: Some(format!("terminal_{}", terminal.terminal_id...
rust_dataset_chunk_511982
rust_dataset.txt
511,982
512
fn the_focused_pane_reports_its_status_while_the_host_window_is_unfocused() { let (mut zellij, _left, focused) = start_with_two_panes(runner()); focused.output(&program_status("state=done:app=claude")); std::thread::sleep(Duration::from_millis(300)); assert_eq!(markers_on_screen(&zellij.snapshot().text)...
rust_dataset_chunk_511983
rust_dataset.txt
511,983
512
ane(&zellij); wait_for_markers(&zellij, ""); zellij.quit(); } #[test] fn nushell_style_shell_reports_a_failed_command_with_screen_text() { let (mut zellij, shell, _other) = start_with_two_panes(runner()); shell.output( b"\x1b]133;A;k=i;click_events=1\x1b\\> \x1b]133;P;k=r\x1b\\\x1b]133;B\x1b\\l...
rust_dataset_chunk_511984
rust_dataset.txt
511,984
512
b\\$ marker\r\n"); zellij.wait_until("the second command finished", |grid_snapshot| { grid_snapshot.contains("marker") }); assert_eq!(markers_on_screen(&zellij.snapshot().text), ""); zellij.quit(); } #[test] fn a_watch_alert_of_a_pane_in_another_tab_clears_once_that_pane_is_focused() { let ...
rust_dataset_chunk_511985
rust_dataset.txt
511,985
512
at_prompt.output(b"\x1b]133;A\x1b\\$ "); let _focused = split_right_pane_down(&zellij); watch(&zellij, &busy); watch(&zellij, &at_prompt); let_the_startup_grace_pass(); unfocus_the_host_window(&zellij); produce_steady_output(&[&busy, &at_prompt], Duration::from_millis(3000)); wait_for_ma...
rust_dataset_chunk_511986
rust_dataset.txt
511,986
512
_on_screen(&grid_snapshot.text), "", "a running command or a foreground program is not working:\n{}", grid_snapshot.text ); let indicator = grid_snapshot.lines()[0].clone(); assert!( !indicator.contains('◐') && !indicator.contains("working"), "the indicator counts som...
rust_dataset_chunk_511987
rust_dataset.txt
511,987
512
.contains("need you") && !bar.contains("watch alert"), "the indicator reacted to plain output: {}", bar ); open_inbox(&zellij); let inbox = zellij.wait_until("the new output waits behind the line", |grid_snapshot| { grid_snapshot.contains("1 more item with") }); assert!(inbox...
rust_dataset_chunk_511988
rust_dataset.txt
511,988
512
line| line.contains("│▌ ●") || line.contains("│ ●")), "{}", inbox.text ); zellij.quit(); } #[test] fn output_from_a_watched_pane_is_not_reported_as_new_output() { let (mut zellij, left, _right) = start_with_two_panes(runner().with_config(SESSION_INDICATOR_ON)); watch(&zellij, &...
rust_dataset_chunk_511989
rust_dataset.txt
511,989
512
ellij.send_stdin(&keys::ctrl('t')); zellij.send_stdin(&keys::key('n')); let terminal = zellij.expect_pty_spawn(); terminal.disable_echo(); terminal.output(b"$ "); zellij.wait_until("the second tab is open", |grid_snapshot| { grid_snapshot.lines()[0].contains("Tab #2") && grid_snapshot.status...
rust_dataset_chunk_511990
rust_dataset.txt
511,990
512
right.output(&program_status("state=working:app=claude")); wait_for_markers(&zellij, "◐"); focus_right_pane(&zellij); focus_left_pane(&zellij); std::thread::sleep(Duration::from_millis(300)); assert_eq!(markers_on_screen(&zellij.snapshot().text), "◐"); open_inbox(&zellij); zellij.wait_until...
rust_dataset_chunk_511991
rust_dataset.txt
511,991
512
.contains("attention_muted=true") && layout.contains("ignore_output=true") }); zellij.quit(); zellij.resurrect(TERMINAL_SIZE); let restored_left = zellij.expect_pty_spawn(); let restored_right = zellij.expect_pty_spawn(); let restored_third = zellij.expect_pty_spawn(); for terminal in [&rest...
rust_dataset_chunk_511992
rust_dataset.txt
511,992
512
ars() }); wait_for_session_attention(&zellij, "the restored session is muted", |attention| { attention.muted }); zellij.quit(); } #[test] fn a_watch_is_not_restored_after_resurrection() { let (mut zellij, left, _right) = start_with_two_panes(runner().with_config(SERIALIZING)); watch(&ze...
rust_dataset_chunk_511993
rust_dataset.txt
511,993
512
print_lines(&left, "ignored output"); zellij.wait_until("the output is drawn", |grid_snapshot| { grid_snapshot.contains("ignored output 2") }); std::thread::sleep(Duration::from_millis(700)); assert_eq!(markers_on_screen(&zellij.snapshot().text), ""); assert_eq!(session_attention(&zellij).c...
rust_dataset_chunk_511994
rust_dataset.txt
511,994
512
right, "ignored by key"); std::thread::sleep(Duration::from_millis(700)); assert_eq!(session_attention(&zellij).counts.new_output, 0); zellij.send_stdin(b"\x1b[I"); press_in_mode(&zellij, 'p', 'v'); wait_for_session_attention(&zellij, "the focused pane is watched", |attention| { attention.it...
rust_dataset_chunk_511995
rust_dataset.txt
511,995
512
: pane_id(&left), }); wait_for_markers(&zellij, ""); zellij.quit(); } fn new_command_pane_with_notify(command: &[&str]) -> CliAction { CliAction::NewPane { direction: None, command: command.iter().map(|part| part.to_string()).collect(), plugin: None, cwd: None, f...
rust_dataset_chunk_511996
rust_dataset.txt
511,996
512
left, _right) = start_with_two_panes( runner().with_config("session_indicator true\nattention {\n frame_markers false\n}"), ); left.output(&program_status("state=blocked:kind=question")); zellij.wait_until("the indicator counts the item", |grid_snapshot| { grid_snapshot.lines()[0].contai...
rust_dataset_chunk_511997
rust_dataset.txt
511,997
512
133;D;0\x1b\\"); wait_for_markers(&zellij, "✓"); zellij.quit(); } fn busy_then_silent_in_another_tab(config: &str) -> (TestSession, FakePtyHandle) { let zellij = runner().with_config(config).start(); let busy = claim_first_terminal_and_wait_for_prompt(&zellij); busy.disable_echo(); let _second ...
rust_dataset_chunk_511998
rust_dataset.txt
511,998
512
ellij, left, _right) = start_with_two_panes(runner()); left.output(&program_status("id=a:state=working")); left.output(&program_status("id=a/b:state=blocked")); wait_for_markers(&zellij, "●"); left.output(&program_status("id=a:state=clear")); wait_for_markers(&zellij, ""); zellij.quit(); } #[te...
rust_dataset_chunk_511999
rust_dataset.txt
511,999
512
;finished\x07"); wait_for_markers(&zellij, "●"); focus_left_pane(&zellij); wait_for_markers(&zellij, ""); focus_right_pane(&zellij); left.output(b"\x1b]99;;Tests passed\x1b\\"); wait_for_markers(&zellij, "●"); zellij.quit(); } #[test] fn a_notifications_text_is_shown_in_the_inbox() { le...