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_512500
rust_dataset.txt
512,500
512
_stdin(&keys::ctrl('t')); zellij.send_stdin(&keys::SPACE); zellij.wait_until("the layout notification is shown", |grid_snapshot| { grid_snapshot.contains("Layout:") }); zellij.quit(); } #[test] fn automatic_layout_changes_do_not_show_a_notification() { let mut zellij = TestRunner::new(TERMI...
rust_dataset_chunk_512501
rust_dataset.txt
512,501
512
(&zellij, 2); open_the_browser_with_the_inbox_key(&zellij); zellij.send_stdin(&keys::INBOX_KEY); wait_for_the_browser_to_close(&zellij); open_the_browser_with_the_inbox_key(&zellij); zellij.quit(); } #[test] fn escape_typed_into_the_terminal_closes_the_card() { let _background = start_running_s...
rust_dataset_chunk_512502
rust_dataset.txt
512,502
512
Instant::now() >= deadline { panic!( "startup_card \"never\" was not written to the config:\n{}", contents ); } std::thread::sleep(std::time::Duration::from_millis(10)); } zellij.quit(); } #[test] fn the_sessions_tab_lists_sessions_as_an_...
rust_dataset_chunk_512503
rust_dataset.txt
512,503
512
?}", messages ); } std::thread::sleep(std::time::Duration::from_millis(10)); } zellij.quit(); } #[test] fn the_startup_card_counts_only_live_sessions_and_closes_on_the_first_command() { let _resurrectable = leave_a_resurrectable_session(); let _background = s...
rust_dataset_chunk_512504
rust_dataset.txt
512,504
512
_until("the new session sees the live session", |grid_snapshot| { bar_says(grid_snapshot, "running") }); assert_no_card_after_the_session_settles(&zellij); zellij.quit(); } #[test] fn a_named_session_created_from_the_welcome_screen_has_no_card_even_with_other_live_sessions() { let background = ...
rust_dataset_chunk_512505
rust_dataset.txt
512,505
512
INBOX_KEY); wait_for_the_browser_to_close(&zellij); zellij.quit(); } #[test] fn the_inbox_key_opens_and_closes_the_browser_from_locked_mode_of_the_unlock_first_preset() { let mut zellij = TestRunner::new(TERMINAL_SIZE) .with_config(SESSION_FEATURES_ON) .with_cli_options(Options { ...
rust_dataset_chunk_512506
rust_dataset.txt
512,506
512
_in_background(); let outside_git = start_running_session_in_background(); let repository = create_git_repository("gitrepo", "feat-x"); let in_git = TestRunner::new(TERMINAL_SIZE) .with_config(&format!( "{}\ndefault_cwd \"{}\"", SESSION_FEATURES_ON, repository.dis...
rust_dataset_chunk_512507
rust_dataset.txt
512,507
512
_for_prompt(&zellij); let current_session = zellij.session_name().to_owned(); wait_for_card(&zellij, 2); zellij.send_stdin(b"ls"); zellij.send_stdin(&keys::ENTER); terminal.wait_for_stdin("the command reached the terminal", |stdin| { stdin.ends_with(b"ls\r") }); wait_for_the_card_to_...
rust_dataset_chunk_512508
rust_dataset.txt
512,508
512
_reattach_card_closes_itself_once_its_last_item_is_seen() { let other = start_running_session_in_background(); let other_terminal = other.expect_pty_spawn(); other_terminal.output(PROMPT); let mut zellij = start_session_with_session_features(); claim_first_terminal_and_wait_for_prompt(&zellij); ...
rust_dataset_chunk_512509
rust_dataset.txt
512,509
512
ars() && bar_says(grid_snapshot, "1 need you") }); std::thread::sleep(std::time::Duration::from_millis(1500)); let grid_snapshot = zellij.snapshot(); assert!( !grid_snapshot.contains("While you were away"), "the reattach card opened over the pane:\n{}", grid_snapshot.text ); ...
rust_dataset_chunk_512510
rust_dataset.txt
512,510
512
zellij.wait_until("the question is gone", |grid_snapshot| { !grid_snapshot.contains(&question) && grid_snapshot.contains(&name) }); assert!(answers(&name), "cancelling stopped the session"); zellij.send_stdin(&keys::DELETE); zellij.wait_until("the stop is confirmed again", |grid_snapshot| { ...
rust_dataset_chunk_512511
rust_dataset.txt
512,511
512
ICATOR_ON) .start(); claim_first_terminal_and_wait_for_prompt(&zellij); let old_name = zellij.session_name().to_owned(); let new_name = format!("{}-renamed", old_name); let socket = zellij.socket_path(); assert!(socket.exists()); zellij.run_cli_action(zellij_utils::cli::CliAction::Rename...
rust_dataset_chunk_512512
rust_dataset.txt
512,512
512
in 1..=count { text.push_str(&format!("row {:03}\r\n", line)); } terminal.output(text.as_bytes()); } fn visible_rows(grid_snapshot: &GridSnapshot) -> Vec<usize> { regex::Regex::new(r"row (\d{3})") .unwrap() .captures_iter(&grid_snapshot.text) .filter_map(|captures| captures...
rust_dataset_chunk_512513
rust_dataset.txt
512,513
512
_left_click(column + 1, line)); zellij.wait_until("the card opened the browser", |grid_snapshot| { grid_snapshot.contains(BROWSER_TABS) }); zellij.quit(); } --- FILE: zellij/zellij-integration-tests/tests/set_pane_frame_style.rs --- #![cfg(unix)] use zellij_integration_tests::{ claim_first_te...
rust_dataset_chunk_512514
rust_dataset.txt
512,514
512
("Pane #1") && grid_snapshot.contains("Pane #2") && !grid_snapshot.contains(FULL_FRAME_CORNER) }, ); let exit_code = zellij.run_cli_action(CliAction::SetPaneFrameStyle { style: PaneFrameStyle::None, }); assert_eq!(exit_code, 0, "set-pane-frame-style none ...
rust_dataset_chunk_512515
rust_dataset.txt
512,515
512
ROW_RIGHT: &[u8] = b"\x1b[C"; const ARROW_DOWN: &[u8] = b"\x1b[B"; const HIDE_SESSION_NAME_INDEX: usize = 10; fn open_settings(zellij: &TestSession) -> GridSnapshot { zellij.send_stdin(&keys::ctrl('o')); zellij.send_stdin(&keys::key('c')); zellij.wait_until("settings screen opened", |grid_snapshot| { ...
rust_dataset_chunk_512516
rust_dataset.txt
512,516
512
open_settings(&zellij); zellij.wait_until("tab bar shows the session name", |grid_snapshot| { tab_bar_shows_session_name(grid_snapshot, &session_name) && !tiled_pane_has_full_frame(grid_snapshot) }); toggle_hide_session_name(&zellij); zellij.wait_until("session name hidden in the t...
rust_dataset_chunk_512517
rust_dataset.txt
512,517
512
() )); assert!(!backup_file_path.exists()); open_settings(&zellij); focus_setting_by_search(&zellij, "scrollback lines", "Scrollback lines"); zellij.send_stdin(ARROW_RIGHT); zellij.wait_until("restart-only change is pending", |grid_snapshot| { grid_snapshot.contains("11000") ...
rust_dataset_chunk_512518
rust_dataset.txt
512,518
512
the_unsaved_marker_in_the_side_menu_takes_the_hover_background() { let mut zellij = TestRunner::new(TERMINAL_SIZE) .with_config("mouse_mode true\nadvanced_mouse_actions true\nmouse_hover_effects true") .start(); claim_first_terminal_and_wait_for_prompt(&zellij); open_settings(&zellij); ...
rust_dataset_chunk_512519
rust_dataset.txt
512,519
512
(&config_file_path).unwrap(); assert!( written.contains("terminal {\n blur true\n}"), "config file was not updated: {}", written ); zellij.quit(); } const TWO_THEMES: &str = "themes { first { text_unselected { base 1 1 1 background 1 1 1 ...
rust_dataset_chunk_512520
rust_dataset.txt
512,520
512
_and_wait_for_prompt(&zellij); zellij_integration_tests::split_right_and_wait_for_prompt(&zellij); terminal.output(b"\x1b]7501;state=blocked:kind=question\x1b\\"); zellij.wait_until("the pane frame shows the status", |grid_snapshot| { grid_snapshot .lines() .iter() ...
rust_dataset_chunk_512521
rust_dataset.txt
512,521
512
] fn clicking_a_focused_text_setting_starts_editing_it() { let mut zellij = TestRunner::new(TERMINAL_SIZE) .with_config("mouse_mode true") .start(); claim_first_terminal_and_wait_for_prompt(&zellij); open_settings(&zellij); focus_setting_by_search(&zellij, "word sep", "Word separators");...
rust_dataset_chunk_512522
rust_dataset.txt
512,522
512
_file_path = zellij.config_file_path().unwrap(); let watcher = zellij.attach_watcher(TERMINAL_SIZE); zellij_integration_tests::wait_for("a watching window is told its font", || { told_font(&watcher.received_terminal_settings(), "Old Mono") }); let edited = std::fs::read_to_string(&config_file_p...
rust_dataset_chunk_512523
rust_dataset.txt
512,523
512
std::fs::write(&path, format!("#!/bin/sh\necho \"zellij {}\"\n", version)).unwrap(); use std::os::unix::fs::PermissionsExt; std::fs::set_permissions(&path, std::fs::Permissions::from_mode(0o755)).unwrap(); bin } fn copy_of_this_binary() -> PathBuf { let bin = home().join(".local").join("bin"); ...
rust_dataset_chunk_512524
rust_dataset.txt
512,524
512
}); zellij.send_stdin(&keys::ctrl('w')); wait_for_setup_items(zellij); } fn install_the_desktop_entry_and_resolve_the_setup() -> PathBuf { let outcomes = platform::apply(&[Item::Launcher], &[], false); assert!(outcomes.iter().all(|o| o.succeeded), "{:?}", outcomes); desktop_integration::update(|st...
rust_dataset_chunk_512525
rust_dataset.txt
512,525
512
zellij.send_stdin(&keys::ESC); let grid_snapshot = zellij.wait_until("session manager closed", |grid_snapshot| { !grid_snapshot.contains("Session: ") }); assert!( !grid_snapshot.contains(TITLE), "the setup screen came back:\n{}", grid_snapshot.text ); } #[test] fn a_dis...
rust_dataset_chunk_512526
rust_dataset.txt
512,526
512
.contains(&format!("[x] {} [?] [Uninstall]", ENTRY)) && grid_snapshot.contains(GRAYED_NOTE) }); let (column, row) = grid_snapshot.position_of(COPY).unwrap(); assert!( grid_snapshot.region_has_dim(column..column + COPY.len(), row..row + 1), "the copy line is not grayed out" );...
rust_dataset_chunk_512527
rust_dataset.txt
512,527
512
entry.exists()); zellij.wait_until("the line can be ticked again", |grid_snapshot| { grid_snapshot.contains("The desktop entry was uninstalled.") && grid_snapshot.contains(&format!("[ ] {}", ENTRY)) && !grid_snapshot.contains("[Uninstall]") }); zellij.kill_session(); } #[tes...
rust_dataset_chunk_512528
rust_dataset.txt
512,528
512
{}", COPY)) && grid_snapshot.contains(&format!("[ ] {}", ENTRY)) }); click_on(&zellij, &format!("[ ] {}", ENTRY), 4); zellij.wait_until("ticking the entry ticks the copy again", |grid_snapshot| { grid_snapshot.contains(&format!("[x] {}", COPY)) && grid_snapshot.contains(&for...
rust_dataset_chunk_512529
rust_dataset.txt
512,529
512
assert!( !grid_snapshot.contains("Tab #1"), "the borrowed pane title replaces the default tab name:\n{}", grid_snapshot.text ); zellij.quit(); } #[test] fn lone_default_pane_keeps_the_default_tab_name() { let mut zellij = start_zellij(); claim_first_terminal_and_wait_for_pr...
rust_dataset_chunk_512530
rust_dataset.txt
512,530
512
("tab name carries the exit status", |grid_snapshot| { grid_snapshot.contains("EXIT CODE: 0") }); zellij.quit(); } --- FILE: zellij/zellij-integration-tests/tests/stacked_pane_list.rs --- #![cfg(unix)] use insta::assert_snapshot; use zellij_integration_tests::{ claim_first_terminal_and_wait_for_...
rust_dataset_chunk_512531
rust_dataset.txt
512,531
512
first member content rendered", |grid_snapshot| { grid_snapshot.contains("first-member") }); let second_member = add_stacked_pane_and_wait_for_selected_entry(zellij, "Pane #2"); second_member.output(b"second-member\r\n$ "); zellij.wait_until("second member content rendered", |grid_snapshot| { ...
rust_dataset_chunk_512532
rust_dataset.txt
512,532
512
#1") && grid_snapshot.contains("Pane #2") && grid_snapshot.contains(&selected_entry("Pane #3")) && grid_snapshot.contains("third-member") }); assert_snapshot!(normalized(&grid_snapshot)); zellij.quit(); } #[test] fn a_layout_stack_renders_as_a_title_list() { let mut...
rust_dataset_chunk_512533
rust_dataset.txt
512,533
512
_snapshot| { grid_snapshot.contains("<g> LOCK") && grid_snapshot.contains(&selected_entry("Pane #2")) && grid_snapshot.contains("second-member") && !grid_snapshot.contains(&selected_entry("Pane #3")) }); assert_snapshot!(normalized(&middle_member_selected)); zell...
rust_dataset_chunk_512534
rust_dataset.txt
512,534
512
zellij.send_stdin(&keys::ctrl('p')); zellij.send_stdin(&keys::key('x')); let grid_snapshot = zellij.wait_until("third member closed, second promoted", |grid_snapshot| { grid_snapshot.status_bar_appears() && !grid_snapshot.contains("Pane #3") && grid_snaps...
rust_dataset_chunk_512535
rust_dataset.txt
512,535
512
{ grid_snapshot.status_bar_appears() && grid_snapshot.contains("Tab #2") && grid_snapshot.contains("third-member") && !grid_snapshot.contains("Pane #1") }); zellij.send_stdin(&keys::alt('h')); let grid_snapshot = zellij.wait_until("stack shrank to two members", ...
rust_dataset_chunk_512536
rust_dataset.txt
512,536
512
_snapshot)); zellij.quit(); } #[test] fn clicking_a_hidden_entry_swaps_it_in() { let mut zellij = TestRunner::new(TERMINAL_SIZE) .with_config("mouse_mode true") .start(); build_three_member_stack(&zellij); let grid_snapshot = zellij.wait_until("stack list rendered", |grid_snapshot| { ...
rust_dataset_chunk_512537
rust_dataset.txt
512,537
512
.send_stdin(b"synced-input"); for member in &members { member.wait_for_stdin("synced input reached member", |stdin| { stdin.windows(12).any(|window| window == b"synced-input") }); } zellij.quit(); } #[test] fn entries_share_a_uniform_width_sized_by_the_widest_title() { let ...
rust_dataset_chunk_512538
rust_dataset.txt
512,538
512
Some(TerminalAction::RunCommand(run_command)) => run_command .command .to_string_lossy() .contains("member-command"), _ => false, }) .expect("one member runs a command") .clone(); zellij.wait_until( "stack list r...
rust_dataset_chunk_512539
rust_dataset.txt
512,539
512
.wait_for_size("visible member resized", |cols, _rows| cols <= 100); for hidden_member in [&first_member, &second_member] { hidden_member.wait_for_size("hidden member resized with the tab", |cols, rows| { (cols, rows) == (resized_cols, resized_rows) }); } zellij.quit(); } fn bui...
rust_dataset_chunk_512540
rust_dataset.txt
512,540
512
let (mut zellij, editor) = build_two_member_stack_with_scrollback_editor(); zellij.send_stdin(&keys::alt('k')); zellij.wait_until("editor member swapped out", |grid_snapshot| { grid_snapshot.contains("first-member") && !grid_snapshot.contains("editor-open") }); zellij.send_stdin(&keys::ctrl('...
rust_dataset_chunk_512541
rust_dataset.txt
512,541
512
.send_stdin(&keys::ctrl('p')); zellij.send_stdin(&keys::key('d')); let new_pane = zellij.expect_pty_spawn(); new_pane.output(PROMPT); let grid_snapshot = zellij.wait_until("list re-formed above the new pane", |grid_snapshot| { grid_snapshot.contains("<g> LOCK") && grid_snapshot.cont...
rust_dataset_chunk_512542
rust_dataset.txt
512,542
512
_member.output(b"first-member\r\n$ "); let _lower_terminal = split_down_and_wait_for_prompt(&zellij); let third_member = add_stacked_pane_and_wait_for_selected_entry(&zellij, "Pane #3"); third_member.output(b"third-member\r\n$ "); zellij.wait_until("third member content rendered", |grid_snapshot| { ...
rust_dataset_chunk_512543
rust_dataset.txt
512,543
512
_and_wait_for_prompt, keys, start_zellij, HostTerminal, TestRunner, TestSession, TERMINAL_SIZE, }; const IDLE_BEYOND_SHORT_FLUSH: Duration = Duration::from_millis(150); const EXIT_QUERY: &[u8] = b"\x1b[?1004l\x1b[c"; const EXIT_ALTERNATE_SCREEN: &[u8] = b"\x1b[?1049l"; const PRIMARY_DA_REPLY: &[u8] = b"\x1b[?62;22...
rust_dataset_chunk_512544
rust_dataset.txt
512,544
512
); assert!( !stdin.contains(&b';'), "host reply payload leaked into the pane: {:?}", stdin ); unlock_interface(&zellij); zellij.quit(); } #[test] fn pixel_reply_split_after_the_introducer_does_not_leak_into_focused_pane() { let mut zellij = start_zellij_with_a_silent_ho...
rust_dataset_chunk_512545
rust_dataset.txt
512,545
512
reached the pane", |stdin_bytes| { stdin_bytes.windows(4).any(|window| window == b"11;r") }); sleep(IDLE_BEYOND_SHORT_FLUSH); let stdin = terminal.stdin_bytes(); assert!( !stdin.windows(3).any(|window| window == b"25;"), "a startup pixel reply was handed to the pane: {:?}", ...
rust_dataset_chunk_512546
rust_dataset.txt
512,546
512
(5) .filter(|window| *window == b"hello") .count(); assert_eq!( occurrences, 1, "typed keys must reach the pane exactly once: {:?}", stdin ); unlock_interface(&zellij); zellij.quit(); } #[test] fn a_detaching_client_waits_for_the_host_to_stop_reporting_and_drops...
rust_dataset_chunk_512547
rust_dataset.txt
512,547
512
label.len(), None => return false, } } true } fn open_new_tab_and_wait_for_prompt(zellij: &TestSession, expected_tab: &str) -> FakePtyHandle { zellij.send_stdin(&keys::ctrl('t')); zellij.send_stdin(&keys::key('n')); let terminal = zellij.expect_pty_spawn(); terminal.output(...
rust_dataset_chunk_512548
rust_dataset.txt
512,548
512
_snapshot.contains("Tab #2") && grid_snapshot.contains("oneone") && !grid_snapshot.contains("twotwo") }); assert_snapshot!(normalized(&grid_snapshot)); zellij.quit(); } #[test] fn go_to_next_tab() { let mut zellij = start_zellij(); let first_terminal = claim_first_terminal_a...
rust_dataset_chunk_512549
rust_dataset.txt
512,549
512
#2", "twotwo"); zellij.send_stdin(&keys::ctrl('t')); zellij.send_stdin(&keys::TAB); zellij.send_stdin(&keys::ENTER); let grid_snapshot = zellij.wait_until("toggled back to the first tab", |grid_snapshot| { grid_snapshot.status_bar_appears() && grid_snapshot.contains("Tab #2") ...
rust_dataset_chunk_512550
rust_dataset.txt
512,550
512
_for_prompt(&zellij); zellij.send_stdin(&keys::ctrl('p')); zellij.send_stdin(&keys::key('n')); let second_terminal = zellij.expect_pty_spawn(); second_terminal.output(PROMPT); zellij.wait_until("second pane spawned in first tab", |grid_snapshot| { grid_snapshot.status_bar_appears() && grid_...
rust_dataset_chunk_512551
rust_dataset.txt
512,551
512
(TERMINAL_SIZE.cols as u16, TERMINAL_SIZE.rows as u16 - 2); floating_terminal.wait_for_size("pane resized to its new tab", move |cols, rows| { (cols, rows) == expected_size }); // give any (unwanted) additional resize a chance to arrive before we assert std::thread::sleep(std::time::Duration::f...
rust_dataset_chunk_512552
rust_dataset.txt
512,552
512
); label_first_tab_pane(&zellij, &first_terminal, "alpha"); open_marked_tab(&zellij, "Tab #2", "beta"); zellij.send_stdin(&keys::ctrl('t')); zellij.send_stdin(&keys::key('[')); let grid_snapshot = zellij.wait_until("beta pane moved into the left tab", |grid_snapshot| { grid_snapshot.statu...
rust_dataset_chunk_512553
rust_dataset.txt
512,553
512
AL_SIZE.cols + 20, rows: TERMINAL_SIZE.rows + 6, }; zellij.resize(larger_size); zellij.wait_until( "second tab re-rendered at the larger size", move |snapshot| snapshot.contains("twotwo") && snapshot.row_count() == larger_size.rows, ); zellij.send_stdin(&keys::ctrl('t')); ...
rust_dataset_chunk_512554
rust_dataset.txt
512,554
512
} #[test] fn move_tab_to_left() { let mut zellij = start_zellij(); claim_first_terminal_and_wait_for_prompt(&zellij); open_new_tab_and_wait_for_prompt(&zellij, "Tab #2"); open_new_tab_and_wait_for_prompt(&zellij, "Tab #3"); zellij.send_stdin(&keys::alt('i')); let grid_snapshot = zellij.wait_u...
rust_dataset_chunk_512555
rust_dataset.txt
512,555
512
("third tab wrapped to the end", |grid_snapshot| { tabs_in_order(grid_snapshot, &["Tab #1", "Tab #2", "Tab #3"]) }); assert_snapshot!(normalized(&grid_snapshot)); zellij.quit(); } #[test] fn move_tab_to_right_until_it_wraps_around() { let mut zellij = start_zellij(); claim_first_terminal_an...
rust_dataset_chunk_512556
rust_dataset.txt
512,556
512
, '3'); zellij.wait_until( "the third position holds the tab the tab bar shows there", |grid_snapshot| grid_snapshot.contains("twotwo") && !grid_snapshot.contains("threethree"), ); go_to_tab_position(&zellij, '1'); let grid_snapshot = zellij.wait_until( "the first position holds...
rust_dataset_chunk_512557
rust_dataset.txt
512,557
512
moved there", |grid_snapshot| grid_snapshot.contains("threethree") && !grid_snapshot.contains("twotwo"), ); go_to_tab_position(&zellij, '2'); zellij.wait_until( "the tab that followed the closed one moved up one position", |grid_snapshot| grid_snapshot.contains("twotwo") && !grid_sn...
rust_dataset_chunk_512558
rust_dataset.txt
512,558
512
_and_wait_for_prompt, col, keys, FakePtyHandle, Size, TestRunner, TestSession, PROMPT, TERMINAL_SIZE, }; use zellij_utils::cli::CliAction; fn new_pane_action(stacked: bool, no_focus: bool, tab_id: Option<usize>) -> CliAction { CliAction::NewPane { direction: None, command: vec![], plugi...
rust_dataset_chunk_512559
rust_dataset.txt
512,559
512
ellij.run_cli_action(new_pane_action(true, true, Some(0))); assert_eq!(exit_code, 0); let stacked_pane = zellij.expect_pty_spawn(); stacked_pane.output(b"stacked-in-background\r\n$ "); zellij.send_stdin(&keys::alt('h')); zellij.wait_until( "focus moved into the first tab and its stacked pan...
rust_dataset_chunk_512560
rust_dataset.txt
512,560
512
33 emphasis_1 11 22 33 emphasis_2 11 22 33 emphasis_3 11 22 33 } ribbon_unselected { base 11 22 33 background 0 0 0 emphasis_0 11 22 33 emphasis_1 11 22 33 emphasis_2 11 22 33 emphasis_3 11 22 33...
rust_dataset_chunk_512561
rust_dataset.txt
512,561
512
u8], other: &[u8]) -> bool { match ( last_occurrence(haystack, expected), last_occurrence(haystack, other), ) { (Some(_), None) => true, (Some(expected_at), Some(other_at)) => expected_at > other_at, _ => false, } } fn wait_for_dark_palette(zellij: &TestSession, what...
rust_dataset_chunk_512562
rust_dataset.txt
512,562
512
_for_prompt(&zellij); let on_arrival = theme_announcements(&zellij); assert!( on_arrival > 0, "a client was not told which mode the session it joined is in" ); zellij.send_stdin(&SET_LIGHT_THEME); wait_for_light_palette(&zellij, "the light theme palette was rendered"); let afte...
rust_dataset_chunk_512563
rust_dataset.txt
512,563
512
, TestRunner, TestSession, PROMPT, }; const FOCUSED_PANE_COLUMN: usize = 90; const ALTERNATE_FOCUSED_PANE_COLUMN: usize = 100; const OTHER_PANE_COLUMN: usize = 10; const HOVER_LINE: usize = 12; fn start_zellij_with_mouse() -> TestSession { TestRunner::new(Size { cols: 120, rows: 24, }) .wi...
rust_dataset_chunk_512564
rust_dataset.txt
512,564
512
_stdin(&keys::key('r')); let right_terminal = zellij.expect_pty_spawn(); right_terminal.output(PROMPT); zellij.wait_until("two full-frame panes rendered", |grid_snapshot| { grid_snapshot.contains("Pane #1") && grid_snapshot.contains("Pane #2") && grid_snapshot.status_bar_appe...
rust_dataset_chunk_512565
rust_dataset.txt
512,565
512
ellij = full_frame_two_pane_session(120); zellij.send_stdin(&sgr_motion(FOCUSED_PANE_COLUMN, HOVER_LINE)); zellij.wait_until("resize hint shown", |grid_snapshot| { grid_snapshot.contains("resize") }); zellij.send_stdin(b"x"); zellij.wait_until("hint cleared by input", |grid_snapshot| { ...
rust_dataset_chunk_512566
rust_dataset.txt
512,566
512
the pane frame", |grid_snapshot| { grid_snapshot.contains("to resize") }); let tab_bar = tab_bar_line(&grid_snapshot); assert!( !tab_bar.contains("resize"), "in full-frame mode the resize help belongs on the pane frame, not the tab bar:\n{}", grid_snapshot.text ); le...
rust_dataset_chunk_512567
rust_dataset.txt
512,567
512
", |grid_snapshot| grid_snapshot.cell_foreground(0, frame_row) != unhovered_frame_color, ); assert!( !hovered.contains("group"), "mouse_hover_tips false must suppress the group tip on the pane frame:\n{}", hovered.text ); assert!( !tab_bar_line(&hovered).contains...
rust_dataset_chunk_512568
rust_dataset.txt
512,568
512
_when_mouse_hover_tips_is_absent_from_the_config() { let mut zellij = full_frame_two_pane_session(120); zellij.send_stdin(&sgr_motion(FOCUSED_PANE_COLUMN, HOVER_LINE)); zellij.wait_until( "resize hint shown on the frame by default when the option is absent", |grid_snapshot| grid_snapshot.co...
rust_dataset_chunk_512569
rust_dataset.txt
512,569
512
format!( "\u{1b}[<0;{};{}M\u{1b}[<0;{};{}m", column, line, column, line ) .into_bytes() } fn display_column_of(line: &str, needle: &str) -> Option<usize> { line.find(needle) .map(|byte_offset| line[..byte_offset].chars().count()) } fn claim_first_terminal_and_wait_for_prompt(zelli...
rust_dataset_chunk_512570
rust_dataset.txt
512,570
512
() { let mut zellij = start_zellij(STATUS_BAR_TEST_COLS); claim_first_terminal_and_wait_for_prompt(&zellij); click_new_pane_button_in_status_bar(&zellij, b"first pane from the status bar"); zellij.wait_until( "the first clicked pane rendered and the status bar gained the multi-pane controls", ...
rust_dataset_chunk_512571
rust_dataset.txt
512,571
512
ellij = start_zellij(120); claim_first_terminal_and_wait_for_prompt(&zellij); let grid_snapshot = zellij.wait_until("tab bar shows the new tab button", |grid_snapshot| { grid_snapshot .lines() .first() .is_some_and(|tab_bar| tab_bar.contains('+')) }); let tab...
rust_dataset_chunk_512572
rust_dataset.txt
512,572
512
= zellij.wait_until( "scroll indicator appears on the tab line", |grid_snapshot| tab_line_shows_scroll(grid_snapshot) && !grid_snapshot.contains(LAST_LINE), ); assert!( !grid_snapshot.contains("SCROLL:"), "the single-pane tab-line indicator uses the colon-free format:\n{}", ...
rust_dataset_chunk_512573
rust_dataset.txt
512,573
512
1b_Ga=T,q=2,f=24,s=2,v=2,m=0;////////////////\x1b\\"; fn start_shared_session() -> TestSession { TestRunner::new(TERMINAL_SIZE) .with_config("web_sharing \"on\"") .start() } struct WebServer { port: u16, token_name: String, session_token: String, handle: tokio::task::JoinHandle<()>...
rust_dataset_chunk_512574
rust_dataset.txt
512,574
512
command/login", port)) .header("Content-Type", "application/json") .body(payload.to_string()) .unwrap() .send() .expect("the login request failed"); assert!(response.status().is_success(), "login was refused"); let cookie = response .headers() .get("set-co...
rust_dataset_chunk_512575
rust_dataset.txt
512,575
512
{ let deadline = tokio::time::Instant::now() + FRAME_TIMEOUT; loop { let message = tokio::time::timeout_at(deadline, self.terminal_ws.next()) .await .expect("no render frame arrived before the deadline") .expect("the terminal websocket closed"...
rust_dataset_chunk_512576
rust_dataset.txt
512,576
512
runtime.block_on(async { let control_ws = open_socket( &format!( "ws://127.0.0.1:{}/ws/control?web_client_id={}", server.port, web_client_id ), &server.session_token, ) .await; let terminal_ws = open_socket( ...
rust_dataset_chunk_512577
rust_dataset.txt
512,577
512
[0]), "each acknowledged frame is followed by a later one, got {:?}", delivered ); shut_down(runtime, server, zellij); } #[test] fn a_kitty_image_reaches_a_remote_structured_client_inline() { let zellij = start_shared_session(); let terminal = claim_first_terminal_and_wait_for_prompt(&...
rust_dataset_chunk_512578
rust_dataset.txt
512,578
512
io::runtime::Builder::new_multi_thread() .enable_all() .build() .unwrap(); let server = start_web_server(&runtime, "integration_structured_input"); let mut client = attach_structured_client(&runtime, &server, zellij.session_name()); let first = runtime.block_on(client.next_frame());...
rust_dataset_chunk_512579
rust_dataset.txt
512,579
512
!({ "type": "Detach" }))); let (exit, seen_control_types) = runtime.block_on(client.control_message_named("Exit")); assert_eq!( exit["reason"], "Normal", "a window is told why it left, in the same words a unix-socket client is told \ (DetachSession sends ExitReason::Normal, zellij-serve...
rust_dataset_chunk_512580
rust_dataset.txt
512,580
512
view.apply(&mut self.cells, self.cols, self.rows); let clusters = view.clusters(); if !clusters.is_empty() { self.saw_cluster_record = true; } for (record, cells) in view.rows() { let start = record.y as usize * self.cols + record.x0 as usize; if star...
rust_dataset_chunk_512581
rust_dataset.txt
512,581
512
new(); for index in 0..200 { lines.push_str(&format!("scroll {:03}\r\n", index)); } terminal.output(lines.as_bytes()); let mut bottom = None; for _ in 0..40 { next_applied_frame(&runtime, &mut client, &mut screen); bottom = screen.row_containing("scroll 199"); if bot...
rust_dataset_chunk_512582
rust_dataset.txt
512,582
512
") .start(); let terminal = claim_first_terminal_and_wait_for_prompt(&zellij); terminal.disable_echo(); let runtime = tokio::runtime::Builder::new_multi_thread() .enable_all() .build() .unwrap(); let server = start_web_server(&runtime, "integration_structured_clusters");...
rust_dataset_chunk_512583
rust_dataset.txt
512,583
512
zellij_utils::data::{BareKey, KeyWithModifier}; use zellij_utils::input::actions::Action; use zellij_utils::input::options::Options; use zellij_utils::ipc::{ClientToServerMsg, ExitReason, IpcSenderWithContext, ServerToClientMsg}; use zellij_utils::structured_render::{self, WireCell}; const DEADLINE: Duration = Durati...
rust_dataset_chunk_512584
rust_dataset.txt
512,584
512
BLANK; size.rows * size.cols], texts: vec![String::from(" "); size.rows * size.cols], saw_cluster_record: false, saw_group_continuation: false, } } fn send(&mut self, msg: ClientToServerMsg) { self.sender .send_client_msg(msg) .expect(...
rust_dataset_chunk_512585
rust_dataset.txt
512,585
512
offset] = cell.text(&clusters).into_owned(); if cell.is_group_continuation() { self.saw_group_continuation = true; } } } } fn row_text(&self, row: usize) -> String { let start = row * self.size.cols; let mut text = String:...
rust_dataset_chunk_512586
rust_dataset.txt
512,586
512
start(); let terminal = claim_first_terminal_and_wait_for_prompt(&zellij); terminal.disable_echo(); let size = smaller_than_the_terminal(); let mut window = WindowClient::attach(&zellij, size); terminal.output(b"shared by both clients\r\n"); let (cols, rows) = window.frame_showing("shared by b...
rust_dataset_chunk_512587
rust_dataset.txt
512,587
512
let mut zellij = TestRunner::new(TERMINAL_SIZE).start(); let terminal = claim_first_terminal_and_wait_for_prompt(&zellij); terminal.disable_echo(); let mut window = WindowClient::attach(&zellij, smaller_than_the_terminal()); terminal.output(b"before the window left\r\n"); window.frame_showing("...
rust_dataset_chunk_512588
rust_dataset.txt
512,588
512
ExitReason::Normal, "a killed session ends normally for every client, so the window closes quietly" ); } const FAMILY: &str = "\u{1f468}\u{200d}\u{1f469}\u{200d}\u{1f467}"; const FLAG: &str = "\u{1f1e9}\u{1f1ea}"; const THUMBS: &str = "\u{1f44d}\u{1f3fd}"; const KSSA: &str = "\u{915}\u{94d}\u{937}"...
rust_dataset_chunk_512589
rust_dataset.txt
512,589
512
, zellij); } #[test] fn a_window_receives_emoji_sequences_as_single_clusters_by_default() { let zellij = TestRunner::new(TERMINAL_SIZE).start(); let terminal = claim_first_terminal_and_wait_for_prompt(&zellij); terminal.disable_echo(); let mut window = WindowClient::attach(&zellij, TERMINAL_SIZE); ...
rust_dataset_chunk_512590
rust_dataset.txt
512,590
512
position::Position::new(0, column as u16); let mut press = zellij_utils::input::mouse::MouseEvent::new_left_press_event(at); window.act(Action::MouseEvent { event: press }); press.event_type = zellij_utils::input::mouse::MouseEventType::Release; press.left = false; window.act(Action::MouseEvent { ev...
rust_dataset_chunk_512591
rust_dataset.txt
512,591
512
_pty_spawn(); terminal.output(b"$ "); terminal.output(b"\x1b]7501;state=blocked:kind=question:msg=cTA=\x1b\\"); let pane = terminal.terminal_id(); let mut window = WindowClient::attach_to( background.session_name(), smaller_than_the_terminal(), Some((pane, false)), ); win...
rust_dataset_chunk_512592
rust_dataset.txt
512,592
512
ellij.session_name()) .expect("the session takes the request"); assert_eq!(first.exit_reason(), ExitReason::NormalDetached); assert_eq!(second.exit_reason(), ExitReason::NormalDetached); } --- FILE: zellij/zellij-integration-tests/tests/window_layout.rs --- #![cfg(unix)] use std::collections::BTreeMa...
rust_dataset_chunk_512593
rust_dataset.txt
512,593
512
_client_msg(ClientToServerMsg::StructuredRenderSupport { supported: true, row_shifts: false, }) .expect("failed to declare structured rendering"); let (messages_tx, messages) = mpsc::channel(); std::thread::Builder::new() .name("window...
rust_dataset_chunk_512594
rust_dataset.txt
512,594
512
(&mut self, what: &str, done: impl Fn(&WindowClient) -> bool) { if done(self) { return; } let deadline = Instant::now() + DEADLINE; loop { let remaining = deadline.saturating_duration_since(Instant::now()); let message = self.messages.recv_timeout(rema...
rust_dataset_chunk_512595
rust_dataset.txt
512,595
512
::new_left_press_event(at(from.0, from.1)); press.ctrl = ctrl; window.mouse(press); window.mouse(MouseEvent::new_left_motion_event(at(to.0, to.1))); window.mouse(MouseEvent::new_left_release_event(at(to.0, to.1))); } fn start_zellij() -> TestSession { TestRunner::new(TERMINAL_SIZE) .with_co...
rust_dataset_chunk_512596
rust_dataset.txt
512,596
512
_row), "the popup rectangle covers what the menu drew: {:?} row {}", menu, menu_row ); let inside = (menu.x + 1, menu_row); let outside = if menu.x > 5 { (menu.x - 3, menu.y + 1) } else { (menu.x + menu.cols + 3, menu.y + 1) }; for (x, y) in [inside, outs...
rust_dataset_chunk_512597
rust_dataset.txt
512,597
512
Text); zellij.send_stdin(&keys::ESC); zellij.wait_until("the terminal client's menu to close", |grid| { !grid.contains(COMMON_MENU_MARKER) }); window.leave(); zellij.quit(); } #[test] fn the_pointer_over_a_floating_frame_matches_what_a_drag_there_does() { let mut zellij = start_zellij...
rust_dataset_chunk_512598
rust_dataset.txt
512,598
512
_prompt(&zellij); let floating = open_a_floating_pane(&zellij, &mut window); let right_edge = (floating.x + floating.cols - 1, floating.y + 2); assert_eq!( window.geometry.pointer_at(right_edge.0, right_edge.1, true), PointerKind::ColResize ); left_drag( &mut window, ...
rust_dataset_chunk_512599
rust_dataset.txt
512,599
512
_and_wait_for_the_prompt(&zellij); window.until("the tab and status bars in the layout", |window| { window .geometry .panes .iter() .filter(|pane| pane.plugin_ui()) .count() >= 2 }); let last_row = TERMINAL_SIZE.rows as u16 - 1...