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_512000
rust_dataset.txt
512,000
512
); zellij.quit(); } const NARROW_LAYOUT: &str = r#" layout { pane size=1 borderless=true { plugin location="tab-bar" } pane split_direction="vertical" { pane size=6 pane focus=true } pane size=2 borderless=true { plugin location="status-bar" } } "#; #[test] ...
rust_dataset_chunk_512001
rust_dataset.txt
512,001
512
_bytes()); } fn pane_item( attention: &zellij_utils::attention::SessionAttention, terminal: &FakePtyHandle, ) -> Option<zellij_utils::attention::AttentionItem> { let pane_id = zellij_utils::data::PaneId::Terminal(terminal.terminal_id()); attention .items .iter() .find(|item| ite...
rust_dataset_chunk_512002
rust_dataset.txt
512,002
512
AttentionStatus; let (mut zellij, left, _right) = start_with_two_panes(runner().with_config(FAST_DONE)); start_command(&left, "vim notes"); left.output(b"\x1b[?1049hediting"); zellij.wait_until("the full screen program drew", |grid_snapshot| { grid_snapshot.contains("editing") }); assert...
rust_dataset_chunk_512003
rust_dataset.txt
512,003
512
AttentionStatus::Working, "pressing enter made the command interactive" ); zellij.quit(); } #[test] fn with_track_commands_off_a_long_command_is_only_reported_when_it_ends() { let (mut zellij, left, _right) = start_with_two_panes( runner().with_config("attention {\n done_threshol...
rust_dataset_chunk_512004
rust_dataset.txt
512,004
512
is forgotten", |attention| { pane_item(attention, &left).is_none() }); zellij.send_stdin(&keys::INBOX_KEY); zellij.wait_until( "the browser opens without the agent on either tab", |grid_snapshot| { grid_snapshot.contains("Inbox (0)") && !grid_snapshot.con...
rust_dataset_chunk_512005
rust_dataset.txt
512,005
512
command ) .as_bytes(), ); } fn tab_bar(grid_snapshot: &GridSnapshot) -> String { grid_snapshot.lines().first().cloned().unwrap_or_default() } fn background_session(config: &str) -> (BackgroundTestSession, FakePtyHandle) { let background = TestRunner::new(TERMINAL_SIZE) .with_confi...
rust_dataset_chunk_512006
rust_dataset.txt
512,006
512
1", ); assert!( started.elapsed() < PROPAGATION_LIMIT, "attention took {:?} to arrive", started.elapsed() ); zellij.send_stdin(&keys::INBOX_KEY); let place = format!("{} ", background.session_name()); zellij.wait_until("the inbox opens on the item's row", |grid_snapshot| ...
rust_dataset_chunk_512007
rust_dataset.txt
512,007
512
_until("typing started", |grid_snapshot| { grid_snapshot.contains("typing into") }); zellij.send_stdin(&keys::key('y')); terminal.wait_for_stdin("the key reached the other session", |stdin| { stdin.ends_with(b"y") }); terminal.output(&program_status("state=working")); zellij.wait...
rust_dataset_chunk_512008
rust_dataset.txt
512,008
512
::Toggle)); assert_eq!(context.history.previous(), Some(second.as_str())); zellij .main_client() .send_action(Action::GoToPreviousSession); let (switch, first_session) = follow(&mut zellij, second_session); let context = switch .switch_context .expect("going back carries...
rust_dataset_chunk_512009
rust_dataset.txt
512,009
512
let pane_id = PaneId::Terminal(terminal.terminal_id()); assert_eq!(switch.pane_id, Some((terminal.terminal_id(), false))); assert_eq!( switch.switch_context.and_then(|c| c.arrival), Some(SessionArrival::Attention { pane_id }) ); zellij.quit(); } #[test] fn the_startup_card_opens_when_a...
rust_dataset_chunk_512010
rust_dataset.txt
512,010
512
?")); let grid_snapshot = zellij.wait_until("the first tab shows needs you", |grid_snapshot| { tab_bar(grid_snapshot).contains("Tab #1 ●") }); assert!(!tab_bar(&grid_snapshot).contains("[!]")); zellij.quit(); } fn sgr(button: u8, column: usize, line: usize, end: char) -> Vec<u8> { format!("...
rust_dataset_chunk_512011
rust_dataset.txt
512,011
512
2, rows / 2, 'M')); } zellij.send_stdin(&keys::key('?')); zellij.wait_until( "the keys before the barrier were handled", |grid_snapshot| grid_snapshot.contains("All keys"), ); assert_eq!( leaked_since(&terminal, before), "", "keys or the wheel leaked" ); ...
rust_dataset_chunk_512012
rust_dataset.txt
512,012
512
ellij, "the first item is counted", "● 1"); std::thread::sleep(Duration::from_millis(50)); newer_terminal.output(&needs_you("Newer question?")); wait_for_indicator(&zellij, "both items are counted", "● 2"); zellij.send_stdin(&keys::INBOX_KEY); zellij.wait_until("the dropdown opens on the inbox", |gr...
rust_dataset_chunk_512013
rust_dataset.txt
512,013
512
SESSIONS_HELP) && !shows_inbox(&grid_snapshot), "the dropdown left the view the user was using:\n{}", grid_snapshot.text ); zellij.quit(); } #[test] fn showing_a_hidden_session_manager_again_selects_the_newest_item() { let (background, terminal) = background_session(ATTENTION_ON); let (...
rust_dataset_chunk_512014
rust_dataset.txt
512,014
512
ENTION_ON); let (other, other_terminal) = background_session(ATTENTION_ON); wait_for_indicator(&zellij, "both sessions are known", "2 running"); other_terminal.output(&needs_you("Over there?")); terminal.output(&needs_you("Over here?")); wait_for_indicator(&zellij, "both items are counted", "● 2"); ...
rust_dataset_chunk_512015
rust_dataset.txt
512,015
512
::CliAction::GoToNextAttention); let (switch, _second_session) = follow(&mut zellij, first_session); assert_eq!(switch.name.as_deref(), Some(first.as_str())); assert_eq!(switch.pane_id, Some((terminal.terminal_id(), false))); zellij.quit(); } fn numbered_lines(terminal: &FakePtyHandle, prefix: &str, co...
rust_dataset_chunk_512016
rust_dataset.txt
512,016
512
is drawn", |grid_snapshot| { grid_snapshot.tab_bar_appears() && grid_snapshot.status_bar_appears() }); zellij } #[test] fn switching_sessions_shows_switched_from_for_a_few_seconds() { let (background, _) = background_session(ATTENTION_ON); let mut zellij = start_wide_main_session(); let fi...
rust_dataset_chunk_512017
rust_dataset.txt
512,017
512
grid_snapshot| { !status_bar(grid_snapshot).contains("Done ·") }); assert!( shown_at.elapsed() > Duration::from_secs(2), "the done hint went away after {:?}", shown_at.elapsed() ); zellij.quit(); } #[test] fn session_mode_shows_the_next_item_hint() { let (_background...
rust_dataset_chunk_512018
rust_dataset.txt
512,018
512
keys::ctrl('t')); zellij.send_stdin(&keys::key('n')); let second_terminal = zellij.expect_pty_spawn(); second_terminal.output(b"$ "); zellij.wait_until("the second tab is open", |grid_snapshot| { tab_bar(grid_snapshot).contains("Tab #2") }); zellij.run_cli_action(zellij_utils::cli::CliAc...
rust_dataset_chunk_512019
rust_dataset.txt
512,019
512
{ terminal.output( format!( "\u{1b}]133;A\u{1b}\\$ \u{1b}]133;B\u{1b}\\{}\u{1b}]133;C\u{1b}\\\r\n", command ) .as_bytes(), ); } #[test] fn typing_through_the_live_view_makes_a_running_command_interactive() { let (background, terminal) = background_session(FA...
rust_dataset_chunk_512020
rust_dataset.txt
512,020
512
zellij.send_stdin(&keys::INBOX_KEY); let place = format!("{} ", background.session_name()); zellij.wait_until( "the agent is seen in the live view and offered to be forgotten", |grid_snapshot| { inbox_shows(grid_snapshot, "Inbox (0)") && grid_snapshot.contains(&pl...
rust_dataset_chunk_512021
rust_dataset.txt
512,021
512
{};{};{}{}", button, column, line, final_byte).into_bytes() } fn press(zellij: &TestSession, column: usize, line: usize) { zellij.send_stdin(&sgr(0, column, line, 'M')); } fn drag_to(zellij: &TestSession, column: usize, line: usize) { zellij.send_stdin(&sgr(32, column, line, 'M')); } fn release(zellij: &Test...
rust_dataset_chunk_512022
rust_dataset.txt
512,022
512
tyHandle { zellij.send_stdin(&keys::ctrl('t')); zellij.send_stdin(&keys::key('n')); let terminal = zellij.expect_pty_spawn(); terminal.output(PROMPT); terminal.output(marker.as_bytes()); let expected_tab = expected_tab.to_owned(); let marker = marker.to_owned(); zellij.wait_until("new ma...
rust_dataset_chunk_512023
rust_dataset.txt
512,023
512
}); release(&zellij, third_tab + 5, 1); zellij.wait_until("the dragged tab is focused", |grid_snapshot| { grid_snapshot.contains("FIRST-TAB") && !grid_snapshot.contains("THIRD-TAB") && first_row_order(grid_snapshot, &["Tab #2", "Tab #3", "Tab #1"]) }); zellij.quit(); } ...
rust_dataset_chunk_512024
rust_dataset.txt
512,024
512
, 0, tab); right_click(zellij, tab_column + 2, 1); zellij.wait_until("tab menu opened", |grid_snapshot| { grid_snapshot.contains("Move to start") && grid_snapshot.contains("Move to end") }) } #[test] fn the_tab_menu_moves_a_tab_to_the_start_and_to_the_end() { let mut zellij = start_zellij(); ...
rust_dataset_chunk_512025
rust_dataset.txt
512,025
512
_wide_zellij(); let left_terminal = zellij.expect_pty_spawn(); left_terminal.output(PROMPT); zellij.wait_until("first terminal loaded", |grid_snapshot| { grid_snapshot.status_bar_appears() && grid_snapshot.cursor_is_at(col(2).row(1)) }); zellij.send_stdin(&keys::ctrl('p')); zellij.send_s...
rust_dataset_chunk_512026
rust_dataset.txt
512,026
512
); zellij.quit(); } fn wait_for_compact_bar(zellij: &TestSession) -> FakePtyHandle { let terminal = zellij.expect_pty_spawn(); terminal.output(PROMPT); zellij.wait_until("compact bar loaded", |grid_snapshot| { grid_snapshot.contains("Tab #1") && grid_snapshot.contains("NORMAL") }); term...
rust_dataset_chunk_512027
rust_dataset.txt
512,027
512
, bar_row + 1); zellij.wait_until("the dragged compact tab is focused", |grid_snapshot| { grid_snapshot.contains("FIRST-TAB") && !grid_snapshot.contains("SECOND-TAB") }); zellij.quit(); } #[test] fn clicking_the_compact_mode_label_returns_to_normal_mode() { let mut zellij = start_zellij_with_co...
rust_dataset_chunk_512028
rust_dataset.txt
512,028
512
} fn hover(zellij: &TestSession, column: usize, line: usize) { zellij.send_stdin(&sgr(35, column, line, 'M')); } #[test] fn the_hover_stays_on_a_status_bar_button_after_clicking_it() { let mut zellij = start_wide_zellij(); let terminal = zellij.expect_pty_spawn(); terminal.output(PROMPT); let grid...
rust_dataset_chunk_512029
rust_dataset.txt
512,029
512
(lock_column, status_row) != plain_style }); left_click(&zellij, lock_column + 1, status_row + 1); let grid_snapshot = zellij.wait_until("locked mode entered", |grid_snapshot| { !grid_snapshot.contains("PANE") && grid_snapshot.contains("LOCK") }); assert_eq!( column_of(&grid_snapshot...
rust_dataset_chunk_512030
rust_dataset.txt
512,030
512
); let grid_snapshot = zellij.wait_until("split rendered in normal mode", |grid_snapshot| { grid_snapshot.status_bar_appears() && grid_snapshot.cursor_is_at(col(62).row(2)) }); assert_snapshot!(normalized(&grid_snapshot)); zellij.quit(); } #[test] fn resize_pane() { let mut zellij = start_z...
rust_dataset_chunk_512031
rust_dataset.txt
512,031
512
TERMINAL_SIZE, }; const LARGER_CLIENT_SIZE: Size = Size { cols: 160, rows: 40, }; const SMALLER_CLIENT_SIZE: Size = Size { cols: 100, rows: 20, }; fn session_name_rendered(grid_snapshot: &GridSnapshot) -> bool { grid_snapshot.contains("(test-") } fn pane_size_in_tab_sized(tab_size: Size) -> (...
rust_dataset_chunk_512032
rust_dataset.txt
512,032
512
}); } fn open_marked_tab(zellij: &TestSession, client: &TestClient, marker: &str) -> FakePtyHandle { client.send_stdin(&keys::ctrl('t')); client.send_stdin(&keys::key('n')); let terminal = zellij.expect_pty_spawn(); terminal.output(PROMPT); terminal.output(marker.as_bytes()); let expected_mark...
rust_dataset_chunk_512033
rust_dataset.txt
512,033
512
grid_snapshot.tab_bar_appears() && session_name_rendered(grid_snapshot) && grid_snapshot.status_bar_appears() && grid_snapshot.contains("Pane #2") && grid_snapshot.cursor_is_at(col(62).row(2)) }; let main_grid = zellij.wait_until( "main client foll...
rust_dataset_chunk_512034
rust_dataset.txt
512,034
512
_first_terminal_and_wait_for_prompt(&zellij); let second_client = zellij.attach_client(TERMINAL_SIZE); second_client.wait_until("second client loaded on the first tab", |grid_snapshot| { grid_snapshot.status_bar_appears() && grid_snapshot.cursor_is_at(col(2).row(1)) }); second_client.send_stdi...
rust_dataset_chunk_512035
rust_dataset.txt
512,035
512
_snapshot.cursor_is_at(col(2).row(1)) }); let main_grid = zellij.wait_until( "main client sees the new tab while staying on the first tab", |grid_snapshot| { grid_snapshot.tab_bar_appears() && session_name_rendered(grid_snapshot) && grid_snapshot.s...
rust_dataset_chunk_512036
rust_dataset.txt
512,036
512
sharing its tab", |grid_snapshot| settled_in_tab_sized(grid_snapshot, TERMINAL_SIZE, "oneone"), ); let second_tab_terminal = open_marked_tab(&zellij, &second_client, "twotwo"); second_tab_terminal.wait_for_size( "the new tab is laid out at the size of the client that created it", ...
rust_dataset_chunk_512037
rust_dataset.txt
512,037
512
( "second client settled on its own tab in normal mode before resizing", |grid_snapshot| settled_in_normal_mode(grid_snapshot, LARGER_CLIENT_SIZE, "twotwo"), ); let main_grid_before_resize = zellij.wait_until( "main client settled on its own tab before the peer resizes", |grid_s...
rust_dataset_chunk_512038
rust_dataset.txt
512,038
512
second_client.wait_until( "second client attached to the shared tab", |grid_snapshot| settled_in_tab_sized(grid_snapshot, TERMINAL_SIZE, "oneone"), ); let second_tab_terminal = open_marked_tab(&zellij, &second_client, "twotwo"); second_tab_terminal.wait_for_size("second tab laid out for ...
rust_dataset_chunk_512039
rust_dataset.txt
512,039
512
_CLIENT_SIZE); second_client.wait_until( "second client attached to the shared tab", |grid_snapshot| settled_in_tab_sized(grid_snapshot, TERMINAL_SIZE, "oneone"), ); let second_tab_terminal = open_marked_tab(&zellij, &second_client, "twotwo"); second_tab_terminal.wait_for_size("second ta...
rust_dataset_chunk_512040
rust_dataset.txt
512,040
512
_mode(grid_snapshot, TERMINAL_SIZE, "oneone") && grid_snapshot.contains("Tab #1 [ ]") && !grid_snapshot.contains("Tab #2") }); let second_grid = second_client.wait_until("larger client settled on the shared tab", |grid_snapshot| { settled_in_normal_mode(grid_snapshot,...
rust_dataset_chunk_512041
rust_dataset.txt
512,041
512
one"); let second_client = zellij.attach_client(LARGER_CLIENT_SIZE); second_client.wait_until( "second client attached to the shared tab", |grid_snapshot| settled_in_tab_sized(grid_snapshot, TERMINAL_SIZE, "oneone"), ); let second_tab_terminal = open_marked_tab(&zellij, &second_client, ...
rust_dataset_chunk_512042
rust_dataset.txt
512,042
512
tab shrinks once the smaller client joins it", |cols, rows| (cols, rows) == pane_size_in_tab_sized(TERMINAL_SIZE), ); zellij.wait_until("main client followed to the third tab", |grid_snapshot| { settled_in_tab_sized(grid_snapshot, TERMINAL_SIZE, "threethree") }); go_to_first_tab(&secon...
rust_dataset_chunk_512043
rust_dataset.txt
512,043
512
.wait_until( "smaller client attached to the shared tab", |grid_snapshot| settled_in_tab_sized(grid_snapshot, SMALLER_CLIENT_SIZE, "oneone"), ); first_terminal.wait_for_size( "the shared tab shrinks to the smaller of its two viewers", |cols, rows| (cols, rows) == pane_size_in_tab...
rust_dataset_chunk_512044
rust_dataset.txt
512,044
512
_client.send_stdin(&keys::ctrl('t')); second_client.send_stdin(&keys::key('[')); let second_grid = second_client.wait_until( "second client follows the moved pane into the first tab", |grid_snapshot| { settled_in_normal_mode(grid_snapshot, TERMINAL_SIZE, "threethree") ...
rust_dataset_chunk_512045
rust_dataset.txt
512,045
512
act() { let mut zellij = start_zellij(); claim_first_terminal_and_wait_for_prompt(&zellij); zellij.override_layout("compact"); let grid_snapshot = zellij.wait_until("compact bar rendered with session name", |grid_snapshot| { grid_snapshot.contains("Zellij (test") &&...
rust_dataset_chunk_512046
rust_dataset.txt
512,046
512
let mut zellij = start_zellij(); claim_first_terminal_and_wait_for_prompt(&zellij); let blocking_command = zellij.run_blocking_floating_command(&["blocking-command"]); let floating_terminal = zellij.expect_pty_spawn(); zellij.wait_until("floating command pane appeared", |grid_snapshot| { grid_...
rust_dataset_chunk_512047
rust_dataset.txt
512,047
512
( "re-attached main converges on the same state", |grid_snapshot| { grid_snapshot.status_bar_appears() && grid_snapshot.contains("WATCHER_DONE") && grid_snapshot.contains("│") }, ); assert_snapshot!(normalized(&main_snapshot)); let watcher...
rust_dataset_chunk_512048
rust_dataset.txt
512,048
512
.contains(&clear_below_content) && output.contains(&clear_to_end_of_content_line) }); watcher.quit(); zellij.quit(); } --- FILE: zellij/zellij-integration-tests/tests/close_confirmation.rs --- #![cfg(unix)] use insta::assert_snapshot; use zellij_integration_tests::{ claim_first_terminal_and_wait_for...
rust_dataset_chunk_512049
rust_dataset.txt
512,049
512
(&keys::ENTER); zellij.wait_for_main_client_to_exit(); } #[test] fn the_popup_takes_every_key_in_any_mode() { let mut zellij = start_zellij_confirming_quit(); let terminal = claim_first_terminal_and_wait_for_prompt(&zellij); terminal.output(b"marker-before"); zellij.wait_until("the pane shows its m...
rust_dataset_chunk_512050
rust_dataset.txt
512,050
512
_snapshot.cursor.is_some() }); assert!(!first.contains(TITLE)); zellij.kill_session(); } #[test] fn a_second_quit_while_the_popup_is_open_leaves() { let mut zellij = start_zellij_confirming_quit(); let _terminal = claim_first_terminal_and_wait_for_prompt(&zellij); let second = zellij.attach_cli...
rust_dataset_chunk_512051
rust_dataset.txt
512,051
512
); let (initial_cols, initial_rows) = pane_size(&terminal, "initial pane size"); let attaching_client = zellij.attach_client(ATTACHING_CLIENT_SIZE); attaching_client.wait_until("attaching client loaded", |grid_snapshot| { grid_snapshot.tab_bar_appears() && grid_snapshot.contains("Ctrl +...
rust_dataset_chunk_512052
rust_dataset.txt
512,052
512
"\x1b[C"; const SHIFT_DOWN: &[u8] = b"\x1b[1;2B"; const DELETE: &[u8] = b"\x1b[3~"; const END: &[u8] = b"\x1b[F"; const BACKSPACE: &[u8] = &[0x7f]; const PROMPT_MARKER: &str = "<Esc> - cancel"; const KEYS_PAGE: (usize, usize) = (2, 0); const MOUSE_BINDINGS_PAGE: (usize, usize) = (3, 10); const MENU_PAGE: (usize, usize...
rust_dataset_chunk_512053
rust_dataset.txt
512,053
512
_text(zellij: &TestSession, text: &str) { zellij.send_stdin(text.as_bytes()); } fn save_and_wait(zellij: &TestSession) { zellij.send_stdin(&keys::ctrl('a')); zellij.wait_until("config saved", |grid_snapshot| { grid_snapshot.contains("Saved") && grid_snapshot.contains("0 unsaved changes") }); } ...
rust_dataset_chunk_512054
rust_dataset.txt
512,054
512
}) .start(); claim_first_terminal_and_wait_for_prompt(&zellij); open_settings(&zellij); open_page(&zellij, KEYS_PAGE, "Save as a preset"); let grid_snapshot = zellij.wait_until("preset and keybindings on one page", |grid_snapshot| { grid_snapshot.contains("Mark all") && grid_snapshot.contai...
rust_dataset_chunk_512055
rust_dataset.txt
512,055
512
\" { NewTab; }\n }\n}\n"; assert!(saved.contains(added), "{}", saved); assert_eq!(saved.replacen(added, "", 1), original); zellij.quit(); } #[test] fn a_removed_preset_key_is_written_as_unbind_and_reset_back() { let mut zellij = start_zellij(); claim_first_terminal_and_wait_for_prompt(&zellij); ...
rust_dataset_chunk_512056
rust_dataset.txt
512,056
512
) }); let question_row = grid_snapshot .row_of_line("Delete Alt n from Normal mode?") .unwrap(); let toggle_row = grid_snapshot.row_of_line("Don't ask again").unwrap(); let buttons_row = grid_snapshot.row_of_line("Cancel").unwrap(); assert!(grid_snapshot.lines()[question_row - 2].con...
rust_dataset_chunk_512057
rust_dataset.txt
512,057
512
_zellij(); claim_first_terminal_and_wait_for_prompt(&zellij); open_keybindings(&zellij); zellij.send_stdin(&keys::key('a')); capture_key(&zellij, &keys::alt('n')); zellij.wait_until("the conflict is reported", |grid_snapshot| { grid_snapshot.contains("Key already bound") && grid...
rust_dataset_chunk_512058
rust_dataset.txt
512,058
512
unwrap_or(false) && grid_snapshot.contains("1 unsaved change ") }); zellij.send_stdin(END); zellij.send_stdin(&keys::key('a')); zellij.wait_until("variable form shown", |grid_snapshot| { grid_snapshot.contains("Add Variable") }); type_text(&zellij, "EDITOR"); zellij.send...
rust_dataset_chunk_512059
rust_dataset.txt
512,059
512
.send_stdin(&keys::ENTER); zellij.wait_until("variable added", |grid_snapshot| { grid_snapshot.contains(ADDED_VARIABLE) && grid_snapshot.contains("1 unsaved change ") }); close_settings(&zellij); let new_terminal = zellij_integration_tests::split_right_and_wait_for_prompt(&zellij); assert_eq...
rust_dataset_chunk_512060
rust_dataset.txt
512,060
512
eref(), Some("start") ); zellij.quit(); } fn right_click(zellij: &TestSession, column: usize, line: usize) { zellij.send_stdin(format!("\u{1b}[<2;{};{}M", column, line).as_bytes()); zellij.send_stdin(format!("\u{1b}[<2;{};{}m", column, line).as_bytes()); } fn sgr_click(zellij: &TestSession, co...
rust_dataset_chunk_512061
rust_dataset.txt
512,061
512
("menu item form shown", |grid_snapshot| { grid_snapshot.contains("Add Item") && grid_snapshot.contains("Kind") }); type_text(&zellij, "Hello"); zellij.send_stdin(ARROW_DOWN); zellij.send_stdin(&keys::ENTER); choose_action(&zellij, "newtab", "NewTab"); press_done(&zellij); zellij.wai...
rust_dataset_chunk_512062
rust_dataset.txt
512,062
512
}); let grid_snapshot = zellij.wait_until("the item is shown", |grid_snapshot| { grid_snapshot.contains("Show bars") }); let row_before = grid_snapshot.row_of_line("Show bars"); click_text(&zellij, &grid_snapshot, "Show bars", 0); let grid_snapshot = zellij.wait_until( "the item is...
rust_dataset_chunk_512063
rust_dataset.txt
512,063
512
{}:\n{}", row_needle, grid_snapshot.text)); let line = grid_snapshot.lines()[row].clone(); let byte_index = line .find(needle) .unwrap_or_else(|| panic!("{} is not on the row of {}: {}", needle, row_needle, line)); line[..byte_index].chars().count() } #[test] fn menu_columns_line_up_and_ro...
rust_dataset_chunk_512064
rust_dataset.txt
512,064
512
= "theme \"mine\" themes { mine { fg 250 bg 236 red 160 green 70 blue 32 yellow 178 magenta 133 orange 208 cyan 37 black 16 white 255 } } "; #[test] fn a_colour_of_the_active_config_file_theme_applies_live_and_saves() { ...
rust_dataset_chunk_512065
rust_dataset.txt
512,065
512
3"), "{}", saved); assert!(saved.contains("theme \"mine\""), "{}", saved); zellij.quit(); } #[test] fn a_new_theme_opens_its_color_editor_once_named() { let mut zellij = start_zellij(); claim_first_terminal_and_wait_for_prompt(&zellij); open_settings(&zellij); open_page(&zellij, THEMES_PAGE, "+...
rust_dataset_chunk_512066
rust_dataset.txt
512,066
512
ellij(); claim_first_terminal_and_wait_for_prompt(&zellij); let config_file_path = zellij.config_file_path().unwrap(); open_keybindings(&zellij); zellij.send_stdin(&keys::key('C')); zellij.wait_until("the category is marked", |grid_snapshot| { grid_snapshot.contains("✓") && grid_snapshot.con...
rust_dataset_chunk_512067
rust_dataset.txt
512,067
512
&TestSession) { zellij.wait_until("mouse bindings page shown", |grid_snapshot| { grid_snapshot.contains("From preset:") && grid_snapshot.contains("Mouse bindings") }); } fn enter_mouse_binding_search(zellij: &TestSession) { zellij.send_stdin(&keys::key('/')); zellij.wait_until("the mouse bindi...
rust_dataset_chunk_512068
rust_dataset.txt
512,068
512
mouse_mode true") .start(); claim_first_terminal_and_wait_for_prompt(&zellij); let config_file_path = zellij.config_file_path().unwrap(); let original = std::fs::read_to_string(&config_file_path).unwrap(); open_mouse_bindings(&zellij); start_add_mouse_binding(&zellij, 2); choose_action(...
rust_dataset_chunk_512069
rust_dataset.txt
512,069
512
| { grid_snapshot.contains("<Del> - delete") }); start_add_mouse_binding(&zellij, 2); choose_action(&zellij, "newtab", "NewTab"); press_mouse_form_done(&zellij); zellij.wait_until( "the new mouse binding is listed as unsaved", |grid_snapshot| { !grid_snapshot.con...
rust_dataset_chunk_512070
rust_dataset.txt
512,070
512
placen(removed, "", 1), original); zellij.send_stdin(&keys::key('r')); zellij.wait_until("the mouse binding is back to the preset", |grid_snapshot| { grid_snapshot.contains("back to the preset") && grid_snapshot.contains("1 unsaved change ") }); save_and_wait(&zellij); let reset = std::fs::...
rust_dataset_chunk_512071
rust_dataset.txt
512,071
512
(keybinds_dir.path().join("swapped.kdl"), swapped_preset).unwrap(); let mut zellij = TestRunner::new(TERMINAL_SIZE) .with_config(&format!( "keybinds_dir \"{}\"", keybinds_dir.path().display() )) .start(); claim_first_terminal_and_wait_for_prompt(&zellij); open...
rust_dataset_chunk_512072
rust_dataset.txt
512,072
512
ellij.wait_until("back on the keyboard settings", |grid_snapshot| { grid_snapshot.contains("Key bindings and preset…") }); zellij.send_stdin(ARROW_LEFT); zellij.wait_until("the category menu is focused", |grid_snapshot| { grid_snapshot.contains("<↓↑> - category") }); zellij.send_stdi...
rust_dataset_chunk_512073
rust_dataset.txt
512,073
512
keys::key('c')); zellij.wait_until("settings screen opened", |grid_snapshot| { grid_snapshot.contains("unsaved change") }); } fn hide_session_name_in_frames(zellij: &TestSession) { zellij.send_stdin(&keys::key('/')); zellij.send_stdin(b"hide session"); zellij.wait_until("search shows the se...
rust_dataset_chunk_512074
rust_dataset.txt
512,074
512
::TAB); zellij.send_stdin(&keys::ENTER); zellij.wait_until("keys page shown", |grid_snapshot| { grid_snapshot.contains("Save as a preset") }); zellij.send_stdin(&keys::ENTER); zellij.wait_until("preset list opened", |grid_snapshot| { grid_snapshot.contains("unlock-first") }); ...
rust_dataset_chunk_512075
rust_dataset.txt
512,075
512
ellij); let (config_file_path, outside) = change_then_edit_the_file_outside(&zellij); zellij.send_stdin(&keys::ENTER); zellij.wait_until("saved", |grid_snapshot| { grid_snapshot.contains("Saved to") && grid_snapshot.contains("0 unsaved changes") }); let written = std::fs::read_to_string(&co...
rust_dataset_chunk_512076
rust_dataset.txt
512,076
512
ellij = start_zellij(); claim_first_terminal_and_wait_for_prompt(&zellij); open_settings(&zellij); zellij.send_stdin(ARROW_DOWN); zellij.wait_until("appearance settings shown", |grid_snapshot| { grid_snapshot.contains("Theme (dark terminal)") }); zellij.send_stdin(&keys::TAB); zellij...
rust_dataset_chunk_512077
rust_dataset.txt
512,077
512
zellij_utils::desktop_integration::state_path(); wait_for_file_containing(&path, needle) } #[test] fn the_setup_screen_offers_the_desktop_items_and_the_keybindings_checkbox() { let mut zellij = start_setup_screen(); zellij.wait_until("every part of the screen is shown", |grid_snapshot| { grid_snap...
rust_dataset_chunk_512078
rust_dataset.txt
512,078
512
{ grid_snapshot.contains("UNLOCK") }); zellij.send_stdin(&keys::ctrl('a')); let written = wait_for_file_containing(&config_file_path, "keybinds preset=\"unlock-first\""); assert!( written.starts_with(&first_run_file), "the first-run file was not kept:\n{}", written ...
rust_dataset_chunk_512079
rust_dataset.txt
512,079
512
|grid_snapshot| { !grid_snapshot.contains("Checking this computer") && grid_snapshot.contains(KEYS_LINE) }); click_on( zellij, &format!("{} [?]", KEYS_LINE), KEYS_LINE.chars().count() + 2, ); zellij.wait_until("the info popup opened", |grid_snapshot| { grid_snaps...
rust_dataset_chunk_512080
rust_dataset.txt
512,080
512
grid_snapshot.contains("Approve and Continue") }); zellij.send_stdin(&keys::ENTER); zellij.wait_until("the keybindings screen follows", |grid_snapshot| { grid_snapshot.contains("Please Choose a Keybinding Preset") && grid_snapshot.contains("You can always change this later.") ...
rust_dataset_chunk_512081
rust_dataset.txt
512,081
512
gr_release(column, line, 0)); } fn column_of(grid_snapshot: &GridSnapshot, row: usize, needle: &str) -> Option<usize> { let line = grid_snapshot.lines().get(row)?.clone(); let byte_index = line.find(needle)?; Some(line[..byte_index].chars().count()) } fn wait_for_pane_menu(zellij: &TestSession) -> GridSna...
rust_dataset_chunk_512082
rust_dataset.txt
512,082
512
grid_snapshot.contains(TAB_MENU_MARKER) && grid_snapshot.contains(COMMON_MENU_MARKER) }); assert!(!grid_snapshot.contains(PANE_MENU_MARKER)); zellij.send_stdin(&keys::ESC); wait_for_menu_to_close(&zellij); zellij.quit(); } #[test] fn right_click_on_the_status_bar_opens_the_bar_menu() { let mu...
rust_dataset_chunk_512083
rust_dataset.txt
512,083
512
= start_zellij(); let left_terminal = claim_first_terminal_and_wait_for_prompt(&zellij); let right_terminal = split_right_and_wait_for_prompt(&zellij); left_terminal.output(b"LEFT-MARKER"); right_terminal.output(b"RIGHT-MARKER"); zellij.wait_until("both markers rendered", |grid_snapshot| { ...
rust_dataset_chunk_512084
rust_dataset.txt
512,084
512
')); let second_tab_terminal = zellij.expect_pty_spawn(); second_tab_terminal.output(b"SECOND-TAB-MARKER"); let grid_snapshot = zellij.wait_until("second tab is active", |grid_snapshot| { grid_snapshot.status_bar_appears() && grid_snapshot.contains("SECOND-TAB-MARKER") && tab...
rust_dataset_chunk_512085
rust_dataset.txt
512,085
512
_until("focus stayed on the right pane", |grid_snapshot| { grid_snapshot.status_bar_appears() && grid_snapshot.cursor_is_at(col(62).row(2)) }); left_click(&zellij, 10, 12); zellij.wait_until( "a later click focuses the left pane as usual", |grid_snapshot| { grid_snapshot...
rust_dataset_chunk_512086
rust_dataset.txt
512,086
512
let second_client = zellij.attach_client(TERMINAL_SIZE); second_client.wait_until("second client loaded", |grid_snapshot| { grid_snapshot.tab_bar_appears() && grid_snapshot.status_bar_appears() }); right_click(&zellij, 30, 10); wait_for_pane_menu(&zellij); terminal.output(b"AFTER-MENU-MARK...
rust_dataset_chunk_512087
rust_dataset.txt
512,087
512
&& grid_snapshot.contains("Ctrl p, c") && grid_snapshot.contains("Ctrl p, x") && grid_snapshot.contains("Ctrl p, v") && grid_snapshot.contains("Ctrl p, a") }); zellij.send_stdin(&keys::ESC); wait_for_menu_to_close(&zellij); zellij.quit(); } #[test] fn menu_shortcuts...
rust_dataset_chunk_512088
rust_dataset.txt
512,088
512
f") }, ); zellij.send_stdin(&keys::ESC); zellij.wait_until("context menu closed", |grid_snapshot| { !grid_snapshot.contains(COMMON_MENU_MARKER) && !grid_snapshot.contains(LAST_COMMON_MENU_ITEM) }); zellij.kill_session(); } #[test] fn turning_the_menu_off_in_the_settings...
rust_dataset_chunk_512089
rust_dataset.txt
512,089
512
S"); let grid_snapshot = zellij.wait_until("output after the clicks rendered", |grid_snapshot| { grid_snapshot.contains("AFTER-CLICKS") }); assert!( !grid_snapshot.contains(COMMON_MENU_MARKER) && !grid_snapshot.contains(LAST_COMMON_MENU_ITEM) ); zellij.quit(); } #[test] ...
rust_dataset_chunk_512090
rust_dataset.txt
512,090
512
_pane_menu(&zellij); zellij.send_stdin(&keys::ctrl('t')); zellij.send_stdin(&keys::key('1')); wait_for_menu_to_close(&zellij); zellij.quit(); } #[test] fn detaching_with_keys_works_while_the_menu_is_open() { let mut zellij = start_zellij(); claim_first_terminal_and_wait_for_prompt(&zellij); ...
rust_dataset_chunk_512091
rust_dataset.txt
512,091
512
_for_pane_menu(&zellij); assert!( grid_snapshot.contains("Watch pane"), "{}", grid_snapshot.text ); zellij.send_stdin(&keys::ESC); wait_for_menu_to_close(&zellij); zellij.run_cli_action(CliAction::WatchPane { pane_id: Some(format!("terminal_{}", terminal.terminal_id()...
rust_dataset_chunk_512092
rust_dataset.txt
512,092
512
&& grid_snapshot.contains(&back) }); click_menu_item(&zellij, &grid_snapshot, &back); let (switch, _second) = zellij.follow_switch_into(first_session); assert_eq!(switch.name.as_deref(), Some(first.as_str())); zellij.quit(); } --- FILE: zellij/zellij-integration-tests/tests/desktop_app.rs --- #![...
rust_dataset_chunk_512093
rust_dataset.txt
512,093
512
.map(|paths| std::env::split_paths(&paths).any(|dir| dir.join(program).is_file())) .unwrap_or(false) } fn zellij_binary() -> Option<PathBuf> { if let Some(path) = std::env::var_os(BINARY_ENV) { return Some(PathBuf::from(path)).filter(|path| path.is_file()); } let test = std::env::cu...
rust_dataset_chunk_512094
rust_dataset.txt
512,094
512
Desktop> { let Some(binary) = zellij_binary() else { return unavailable(&format!( "no zellij executable next to the test (build it with `cargo xtask integration-test` or set {})", BINARY_ENV )); }; if !on_path("Xvfb") { return u...
rust_dataset_chunk_512095
rust_dataset.txt
512,095
512
::session_index::SessionIndex> { let cache_dir = self .root .path() .join("cache") .join(zellij_utils::consts::ZELLIJ_CACHE_DIR.file_name()?) .join(&*CLIENT_SERVER_CONTRACT_DIR); let index_path = cache_dir.join(zellij_utils::session_index::inde...
rust_dataset_chunk_512096
rust_dataset.txt
512,096
512
().join(format!("app-{}.log", index)) } fn launch(&mut self, extra: &[&str]) -> usize { let index = self.apps.len(); let log = std::fs::File::create(self.log_path(index)).unwrap(); let child = self .terminal_command(extra) .stdout(log.try_clone().unwrap()) ...
rust_dataset_chunk_512097
rust_dataset.txt
512,097
512
while !check() { if Instant::now() >= deadline { panic!( "timed out waiting for {}\nlast state: {:?}\n{}", what, self.state(), self.logs() ); } std::thread::sleep(D...
rust_dataset_chunk_512098
rust_dataset.txt
512,098
512
mut link = SessionLink::open_path(&self.socket_of(APP_PANEL_SESSION)) .expect("the panel session answers"); for action in actions { link.send(ClientToServerMsg::Action { action, terminal_id: None, client_id: None, is_cli_cl...
rust_dataset_chunk_512099
rust_dataset.txt
512,099
512
expect("the session answers"); link.send(ClientToServerMsg::Action { action: Action::WriteCharsToPaneId { chars: "printf '\\033]7501;state=blocked:kind=question\\033\\\\'\n".to_owned(), pane_id: PaneId::Terminal(0), }, t...