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_512300
rust_dataset.txt
512,300
512
!( host_after_resize.row_of_line("Pane #1").is_none(), "no stray host pane-title line while the guest is fullscreened after resize", ); nested.guest.wait_until( "the guest re-renders filling the enlarged display while fullscreened", |guest_grid| guest_grid.row_count() == LARGER_S...
rust_dataset_chunk_512301
rust_dataset.txt
512,301
512
the host returns to normal mode after scrolling the guest pane", |host_grid| normal_mode_bar_settled(host_grid), ); nested.guest.wait_until( "the guest still shows its ascended UI undisturbed by the host scrolling its pane", guest_ascended_ui_settled, ); assert!(normal_mode_bar_s...
rust_dataset_chunk_512302
rust_dataset.txt
512,302
512
nested.guest.wait_until( "the guest is settled while the host is descended into it", guest_ui_settled, ); sibling.exit(Some(0)); nested.host.wait_until( "the host closed its exited sibling, leaving only the guest pane", |host_grid| !host_grid.contains("Pane #2"), ); ...
rust_dataset_chunk_512303
rust_dataset.txt
512,303
512
_and_descend_on_first_load(&nested); nested.guest.detach_main_client(); nested.wait_for_host_to_reclaim_focus_after_guest_exit(); let sibling = split_host_sibling(&nested); sibling.output(PROMPT); nested.host.wait_until( "the host acts on its own keybindings again after the guest detached"...
rust_dataset_chunk_512304
rust_dataset.txt
512,304
512
use zellij_utils::pane_size::Size; const TERMINAL_SIZE: Size = Size { cols: 121, rows: 30, }; const DEPTH_THREE_TERMINAL_SIZE: Size = Size { cols: 160, rows: 40, }; #[test] fn both_sides_advertise_hint_reporting_during_the_handshake() { let nested = NestedHarness::start(TERMINAL_SIZE); nested...
rust_dataset_chunk_512305
rust_dataset.txt
512,305
512
: 41, result: Ok(nested_session_keybinds), } if nested_session_keybinds.base_mode.is_some() && nested_session_keybinds.session_path.len() == 1 && nested_session_keybinds .keybinds .iter() ...
rust_dataset_chunk_512306
rust_dataset.txt
512,306
512
message, NestedSessionMessage::GuestModeUpdate { mode: InputMode::Pane, session_path, .. } if session_path.len() == 2 ) }, ); let since = nested.mark_middle_to_outer(); nested.middle.send_stdin(...
rust_dataset_chunk_512307
rust_dataset.txt
512,307
512
(); guest_new_pane.output(PROMPT); nested.guest.wait_until( "guest spawned a pane from the passed-through key after auto-descend", |guest_grid| guest_grid.contains("Pane #2"), ); nested.guest.quit(); nested.wait_for_host_to_reclaim_focus_after_guest_exit(); nested.host.quit(); }...
rust_dataset_chunk_512308
rust_dataset.txt
512,308
512
.send_stdin(&keys::ctrl('y')); nested.wait_for_host_to_descend_into_guest_after(descended); nested.host.send_stdin(&keys::alt('n')); let guest_new_pane = nested.guest.expect_pty_spawn(); guest_new_pane.output(PROMPT); nested.guest.wait_until( "guest spawned a pane from the passed-through ke...
rust_dataset_chunk_512309
rust_dataset.txt
512,309
512
bool { grid_snapshot .lines() .last() .map_or(false, |last_line| last_line.contains(needle)) } fn normal_mode_bar_settled(grid_snapshot: &GridSnapshot) -> bool { last_line_contains(grid_snapshot, "LOCK") } fn pane_mode_bar_settled(grid_snapshot: &GridSnapshot) -> bool { last_line_...
rust_dataset_chunk_512310
rust_dataset.txt
512,310
512
GridSnapshot) -> bool { guest_ascended_ui_settled(guest_grid) && prompt_count(guest_grid) == 0 } fn ascended_two_pane_guest_settled(guest_grid: &GridSnapshot) -> bool { guest_ascended_ui_settled(guest_grid) && guest_grid.contains("Pane #1") && guest_grid.contains("Pane #2") && prompt_co...
rust_dataset_chunk_512311
rust_dataset.txt
512,311
512
_guest_via_modal(); nested.wait_for_host_to_ping_guest(); nested.wait_for_guest_to_reply_to_ping(); nested.guest.wait_for_app_load(); nested.host.wait_for_app_load(); nested.guest.quit(); nested.wait_for_host_to_release_guest_focus(); nested.host.quit(); } #[test] fn a_host_zellij_stops_p...
rust_dataset_chunk_512312
rust_dataset.txt
512,312
512
_into_guest_on_the_left(nested: &NestedHarness) { let descended = nested.mark_host_to_guest(); nested.host.send_stdin(&keys::ctrl('p')); nested.host.wait_until( "host entered pane mode before the focus-left key", pane_mode_bar_settled, ); nested.host.send_stdin(ARROW_LEFT); neste...
rust_dataset_chunk_512313
rust_dataset.txt
512,313
512
descend_into_guest_above(nested); } fn quit_guest_then_host(mut nested: NestedHarness) { nested.guest.quit(); nested.wait_for_host_to_reclaim_focus_after_guest_exit(); nested.host.quit(); } #[test] fn host_keys_act_on_host_until_focus_enters_the_guest_then_route_to_guest() { let nested = NestedHar...
rust_dataset_chunk_512314
rust_dataset.txt
512,314
512
its own two panes while the guest gained an inner pane", two_pane_guest_settled, |host_grid| { host_descended_bar_settled(host_grid) && host_grid.contains("Pane #2") && !host_grid.contains("Pane #3") && host_own_tab_bar_settled(host_grid, &gue...
rust_dataset_chunk_512315
rust_dataset.txt
512,315
512
&guest_session_name) }, ); assert_snapshot!( "host_acts_on_key_after_ascend", normalized(&host_after_new_pane) ); nested.guest.quit(); nested.host.quit(); } #[test] fn clicking_a_host_pane_while_descended_refocuses_and_ascends() { let mut nested = NestedHarness::start_...
rust_dataset_chunk_512316
rust_dataset.txt
512,316
512
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()) } #[test] fn clicking_the_host_new_tab_button_while_descended_ascends_and_keeps_working() { let mut nested =...
rust_dataset_chunk_512317
rust_dataset.txt
512,317
512
") && normal_mode_bar_settled(host_grid), ); nested.guest.quit(); nested.host.quit(); } #[test] fn clicking_a_host_tab_while_descended_switches_tabs_and_ascends() { let mut nested = NestedHarness::start_with_host_config(TERMINAL_SIZE, "mouse_mode true"); let guest_session_name = nested.guest.sessi...
rust_dataset_chunk_512318
rust_dataset.txt
512,318
512
.host.send_stdin(&sgr_left_click(first_tab_column, 1)); nested.wait_for_host_to_descend_into_guest_after(descended_by_tab_one); let ascended_by_tab_two = nested.mark_host_to_guest(); nested .host .send_stdin(&sgr_left_click(second_tab_column, 1)); nested.wait_for_host_to_ascend_from_gue...
rust_dataset_chunk_512319
rust_dataset.txt
512,319
512
n')); let guest_new_pane = nested.guest.expect_pty_spawn(); guest_new_pane.output(PROMPT); let guest_after_new_pane = nested.guest.wait_until( "the key after the alt click still reached the guest", two_pane_guest_settled, ); assert_snapshot!( "guest_reacts_to_key_after_alt_cl...
rust_dataset_chunk_512320
rust_dataset.txt
512,320
512
_the_host() { let mut nested = NestedHarness::start(TERMINAL_SIZE); let guest_session_name = nested.guest.session_name().to_string(); boot_and_descend_on_first_load(&nested); ascend_via_focus_host_binding(&nested); split_host_sibling(&nested); descend_into_guest_on_the_left(&nested); neste...
rust_dataset_chunk_512321
rust_dataset.txt
512,321
512
is answered without any focus change" ); assert_eq!( nested.focus_lost_count(), 0, "the host should not ascend on first load" ); nested.guest.wait_for_app_load(); let host_descended_on_load = nested.wait_until_host_composites_settled_guest( "host descended into the ...
rust_dataset_chunk_512322
rust_dataset.txt
512,322
512
"host acts on its own key after the guest went away", |host_grid| { normal_mode_bar_settled(host_grid) && host_grid.contains("Pane #3") && prompt_count(host_grid) == 2 && host_grid.cursor.is_some() && host_own_tab_bar_settled(ho...
rust_dataset_chunk_512323
rust_dataset.txt
512,323
512
&middle_descended_into_settled_inner, &outer_settled, ); assert_snapshot!( "outer_grid_doubly_nested_descended", normalized(&outer_doubly_nested) ); let requested = nested.mark_inner_to_middle(); let ascended = nested.mark_middle_to_inner(); nested.outer.send_std...
rust_dataset_chunk_512324
rust_dataset.txt
512,324
512
focuses the sibling pane undimmed on attach", |host_grid| { host_own_tab_bar_settled(host_grid, &guest_session_name) && host_grid.contains("Pane #2") && host_chrome_undimmed(host_grid) }, ); let descended = nested.mark_host_to_guest(); nested.hos...
rust_dataset_chunk_512325
rust_dataset.txt
512,325
512
host .wait_until("host chrome is undimmed before descending", |host_grid| { host_own_tab_bar_settled(host_grid, &guest_session_name) && host_grid.contains("Pane #2") && normal_mode_bar_settled(host_grid) && host_chrome_undimmed(host...
rust_dataset_chunk_512326
rust_dataset.txt
512,326
512
_on_sibling = nested.host.wait_until( "host focus landed on the sibling pane to the right of the guest", |host_grid| { host_grid.contains("Pane #2") && host_grid.contains("Tab #1") && host_chrome_undimmed(host_grid) }, ); assert!(host_chrome_un...
rust_dataset_chunk_512327
rust_dataset.txt
512,327
512
AL_SIZE); build_descended_state_with_host_sibling(&nested); split_second_guest_pane(&nested); nested.guest.wait_until("two panes", two_pane_guest_settled); pass_ctrl_p_to_guest(&nested); let focus_host_before = nested .guest_to_host() .count(|message| matches!(message, NestedSessio...
rust_dataset_chunk_512328
rust_dataset.txt
512,328
512
_undimmed(host_grid) }, ); nested.guest.quit(); nested.host.quit(); } #[test] fn move_focus_or_tab_bubbles_only_when_the_guest_has_a_single_tab() { let mut nested = NestedHarness::start(TERMINAL_SIZE); build_descended_state_with_host_sibling(&nested); let requested = nested.mark_gues...
rust_dataset_chunk_512329
rust_dataset.txt
512,329
512
{ guest_grid.lines().first().map_or(false, |first_line| { first_line.contains("Tab #1") && first_line.contains("Tab #2") }) && guest_normal_mode_bar_settled(guest_grid) }, ); assert_eq!( nested .guest_to_host() .count(|message| mat...
rust_dataset_chunk_512330
rust_dataset.txt
512,330
512
let middle_sibling = nested.middle.expect_pty_spawn(); middle_sibling.output(b"MIDDLE-SIBLING "); nested.middle.wait_until( "middle spawned a sibling pane next to the inner guest", |middle_grid| middle_grid.contains("MIDDLE-SIBLING"), ); let ascended_outer = nested.mark_outer_to_mid...
rust_dataset_chunk_512331
rust_dataset.txt
512,331
512
nested.outer.send_stdin(&keys::ctrl('p')); nested.middle.wait_until( "middle entered pane mode before the focus-left key", guest_pane_mode_bar_settled, ); nested.outer.send_stdin(ARROW_LEFT); nested.outer.send_stdin(&keys::ctrl('o')); nested.middle.wait_until( "middle ent...
rust_dataset_chunk_512332
rust_dataset.txt
512,332
512
('f')); nested.middle.wait_until( "middle hid its sibling again during the second fullscreen", |middle_grid| !middle_grid.contains("MIDDLE-SIBLING"), ); nested.outer.wait_until( "outer hid its sibling again during the second fullscreen", |outer_grid| !outer_grid.contains("OUT...
rust_dataset_chunk_512333
rust_dataset.txt
512,333
512
) && host_grid .char_dim_of(&format!("({})", host_session_name)) .unwrap_or(false) }, ); assert!( descended .char_dim_of("Zellij") .expect("host tab-bar prefix present"), "the host tab-bar 'Zellij' prefix is...
rust_dataset_chunk_512334
rust_dataset.txt
512,334
512
{ let nested = NestedHarness::start(TERMINAL_SIZE); nested.wait_for_host_to_acknowledge_guest(); // A guest zellij writes its whole startup query batch in one chunk: // forwarded host queries (pixel size, fg/bg) precede the kitty probe, so // the host pane pauses part-way through that chunk. The p...
rust_dataset_chunk_512335
rust_dataset.txt
512,335
512
_new_pane_action(command: &[&str]) -> CliAction { CliAction::NewPane { direction: None, command: command.iter().map(|part| part.to_string()).collect(), plugin: None, cwd: None, floating: false, in_place: false, close_replaced_pane: false, pane_id: None...
rust_dataset_chunk_512336
rust_dataset.txt
512,336
512
ane = zellij.expect_pty_spawn(); unfocused_pane.output(PROMPT); zellij.wait_until( "second pane appeared alongside the first", |grid_snapshot| grid_snapshot.text.matches("$").count() >= 2, ); let probe = b"nofocusprobe"; zellij.send_stdin(probe); wait_until_stdin_contains(&origi...
rust_dataset_chunk_512337
rust_dataset.txt
512,337
512
input leaked into the tab that was created with --no-focus" ); zellij.quit(); } --- FILE: zellij/zellij-integration-tests/tests/no_ui_fullscreen.rs --- #![cfg(unix)] use insta::assert_snapshot; use zellij_integration_tests::{ assert_same_rendered_grid, claim_first_terminal_and_wait_for_prompt, col, keys,...
rust_dataset_chunk_512338
rust_dataset.txt
512,338
512
and layout restored", |grid_snapshot| { grid_snapshot.tab_bar_appears() && grid_snapshot.status_bar_appears() && !grid_snapshot.contains("(FULLSCREEN)") && grid_snapshot.cursor_is_at(col(62).row(2)) }); assert_same_rendered_grid( &after, &before, ...
rust_dataset_chunk_512339
rust_dataset.txt
512,339
512
_appears() && grid_snapshot.cursor_is_at(col(2).row(0)) }, ); assert_snapshot!(normalized(&grid_snapshot)); toggle_no_ui_fullscreen_via_keybinding(&zellij); zellij.wait_until("chrome restored at the new size", |grid_snapshot| { grid_snapshot.tab_bar_appears() ...
rust_dataset_chunk_512340
rust_dataset.txt
512,340
512
(CliAction::SetPaneFrameStyle { style: PaneFrameStyle::None, }); assert_eq!(exit_code, 0, "set-pane-frame-style exited cleanly"); zellij.wait_until("titles removed in none mode", |grid_snapshot| { grid_snapshot.status_bar_appears() && !grid_snapshot.contains("Pane #1") }); toggle_no...
rust_dataset_chunk_512341
rust_dataset.txt
512,341
512
grid_snapshot.status_bar_appears() && !grid_snapshot.contains(FULL_FRAME_CORNER) }, ); let exit_code = zellij.run_cli_action(CliAction::ToggleNoUiFullscreen { pane_id: None }); assert_eq!(exit_code, 0, "toggle-no-ui-fullscreen exited cleanly"); zellij.wait_until( "toggli...
rust_dataset_chunk_512342
rust_dataset.txt
512,342
512
pears() && !grid_snapshot.status_bar_appears() && grid_snapshot.cursor_is_at(col(2).row(0)) }); zellij.send_stdin(&keys::alt('h')); first_terminal.output(b"left_marker"); let grid_snapshot = zellij.wait_until( "focus moved to the left pane which is now no-ui fullscreen"...
rust_dataset_chunk_512343
rust_dataset.txt
512,343
512
in(&keys::ctrl('p')); zellij.send_stdin(&keys::key('d')); let third_terminal = zellij.expect_pty_spawn(); third_terminal.output(PROMPT); zellij.wait_until("third pane split below the right pane", |grid_snapshot| { grid_snapshot.status_bar_appears() && grid_snapshot.cursor_is_at(col(62).row(13)) ...
rust_dataset_chunk_512344
rust_dataset.txt
512,344
512
(); } --- FILE: zellij/zellij-integration-tests/tests/origin_pane_id.rs --- #![cfg(unix)] use zellij_integration_tests::{ claim_first_terminal_and_wait_for_prompt, keys, split_right_and_wait_for_prompt, TestRunner, TestSession, TERMINAL_SIZE, }; const ORIGIN_PANE_ID: &str = "ZELLIJ_ORIGIN_PANE_ID"; fn star...
rust_dataset_chunk_512345
rust_dataset.txt
512,345
512
= start_with_run_bindings(); claim_first_terminal_and_wait_for_prompt(&zellij); zellij.send_stdin(&keys::ctrl('o')); zellij.send_stdin(&keys::key('a')); zellij.wait_until("about plugin shown", |grid_snapshot| { grid_snapshot.contains("About Zellij") }); zellij.send_stdin(&keys::alt('y'...
rust_dataset_chunk_512346
rust_dataset.txt
512,346
512
133;A\x07$ "; const COMMAND_AND_OUTPUT: &str = "echo hi\nhello world\nsecond line"; const LAST_COMMAND_OUTPUT: &str = "hello world\nsecond line"; const ALT_WHEEL_UP: u8 = 72; const ALT_WHEEL_DOWN: u8 = 73; const SCROLL_MODE_HINT: &str = "PgDn|PgUp"; fn start_with_config(config: &str) -> TestSession { TestRunner...
rust_dataset_chunk_512347
rust_dataset.txt
512,347
512
{1b}\\", BASE64_STANDARD.encode(text)).into_bytes() } fn occurrences_of(haystack: &[u8], needle: &[u8]) -> usize { if needle.is_empty() || haystack.len() < needle.len() { return 0; } haystack .windows(needle.len()) .filter(|window| *window == needle) .count() } #[test] fn b...
rust_dataset_chunk_512348
rust_dataset.txt
512,348
512
#[test] fn selecting_the_command_at_the_scroll_position_composes_with_copy() { let mut zellij = start_with_config(NAVIGATION_CONFIG); claim_terminal_with(&zellij, MARKED_COMMAND, "second line"); enter_scroll_mode(&zellij); zellij.send_stdin(&keys::key('m')); zellij.send_stdin(&keys::ctrl('y')); ...
rust_dataset_chunk_512349
rust_dataset.txt
512,349
512
", |grid_snapshot| { let top_line = top_content_line(grid_snapshot); top_line.starts_with("$ cmd") && top_line != before_jump }, ); zellij.send_stdin(&sgr_mouse_report(20, 5, ALT_WHEEL_DOWN)); zellij.wait_until("alt wheel down jumped forward again", |grid_snapshot| {...
rust_dataset_chunk_512350
rust_dataset.txt
512,350
512
command output rendered", |grid_snapshot| { grid_snapshot.tab_bar_appears() && grid_snapshot.status_bar_appears() && grid_snapshot.contains(last_line) }); terminal } fn sgr_mouse_report(column: usize, line: usize, button: u8, final_byte: char) -> Vec<u8> { format!("\u{1b}[<...
rust_dataset_chunk_512351
rust_dataset.txt
512,351
512
(bytes, &expected_copy) >= 1 }); let command_copy = osc52_copy_of("echo hi\nhello world"); assert_eq!( occurrences_of(&raw_output, &command_copy), 0, "a click outside the marked region must not select the marked command" ); zellij.quit(); } #[test] fn a_triple_click_se...
rust_dataset_chunk_512352
rust_dataset.txt
512,352
512
haystack .windows(needle.len()) .filter(|window| *window == needle) .count() } fn claim_quiet_terminal(zellij: &TestSession) -> FakePtyHandle { let terminal = claim_first_terminal_and_wait_for_prompt(zellij); terminal.disable_echo(); terminal } fn split_down_to_quiet_terminal(z...
rust_dataset_chunk_512353
rust_dataset.txt
512,353
512
://host/tmp")), 1, "a pane repeating its working directory does not report it again" ); zellij.quit(); } #[test] fn a_changed_working_directory_is_reported_again() { let mut zellij = start_zellij(); let terminal = claim_quiet_terminal(&zellij); report_cwd_and_wait(&zellij, &termin...
rust_dataset_chunk_512354
rust_dataset.txt
512,354
512
std::sync::Arc; use std::time::{Duration, Instant}; use zellij_integration_tests::inbox::{press_esc, press_release_key}; use zellij_integration_tests::{ keys, BackgroundTestSession, CliCaller, FakePtyHandle, GridSnapshot, LayoutInfo, TestClient, TestRunner, TestSession, TERMINAL_SIZE, }; use zellij_utils::cli:...
rust_dataset_chunk_512355
rust_dataset.txt
512,355
512
-bar" }} floating_panes {{ pane x=4 y=2 width=80 height=20 {{ {} }} }} }} "#, fixture_plugin_node() ) } fn start_viewer() -> Viewer { start_viewer_with(&tiled_viewer_layout(), "") } fn start_viewer_...
rust_dataset_chunk_512356
rust_dataset.txt
512,356
512
".to_owned())) .chain(args.iter().cloned()) .map(|(key, value)| format!("{}={}", key, value)) .collect::<Vec<_>>() .join(","); let args = Some(joined.parse().unwrap()); let pipe = CliAction::Pipe { name: Some(name.to_owned()), payload: None, args, ...
rust_dataset_chunk_512357
rust_dataset.txt
512,357
512
ellij, "the plugin ends capture", "released=Some(Plugin)") } fn status_shows(zellij: &TestSession, what: &str, text: &str) -> GridSnapshot { zellij.wait_until(what, |grid_snapshot| grid_snapshot.contains(text)) } fn occurrences(grid_snapshot: &GridSnapshot, text: &str) -> usize { grid_snapshot.text.matches(te...
rust_dataset_chunk_512358
rust_dataset.txt
512,358
512
panic!("{:?} is not shown:\n{}", text, grid_snapshot.text)); assert!( area.contains(column, row) && area.contains(column + text.chars().count() - 1, row), "{:?} at {:?} is outside the view {:?}:\n{}", text, (column, row), area, grid_snapshot.text ); (column, ...
rust_dataset_chunk_512359
rust_dataset.txt
512,359
512
terminal.output(b"$ watched source\r\n"); let view = source.attach_client(TERMINAL_SIZE); view.wait_until("the source view shows the source", |grid_snapshot| { grid_snapshot.contains("watched source") }); let layout_size = wait_for_the_layout_size(&terminal); WatchedSource { source,...
rust_dataset_chunk_512360
rust_dataset.txt
512,360
512
)); } fn is_pin_state(event: &MirrorTransportEvent, pinned: bool, size: Option<Size>) -> bool { match event { MirrorTransportEvent::Message(SourceMessage::PinState { pinned: reported, pane_size, }) => *reported == pinned && size.map(|size| size == *pane_size).unwrap_or(true)...
rust_dataset_chunk_512361
rust_dataset.txt
512,361
512
assert_keeps_the_size_after_a_barrier(watched: &WatchedSource, size: (u16, u16), barrier: &str) { watched .terminal .output(format!("\r\n$ {}\r\n", barrier).as_bytes()); watched .view .wait_until("the source view shows the barrier", |grid_snapshot| { grid_snapshot.co...
rust_dataset_chunk_512362
rust_dataset.txt
512,362
512
1b\\\r\n", ); let grid_snapshot = status_shows( &viewer.zellij, "the live view follows new output", "coloured and 中 wide linked", ); let (column, row) = assert_inside_the_view(&grid_snapshot, "coloured and 中 wide linked"); assert!(grid_snapshot.char_is_bold(column, row)); ...
rust_dataset_chunk_512363
rust_dataset.txt
512,363
512
let mut paste = keys::BRACKETED_PASTE_START.to_vec(); paste.extend_from_slice(b"pasted text"); paste.extend_from_slice(&keys::BRACKETED_PASTE_END); viewer.zellij.send_stdin(&paste); terminal.wait_for_stdin("the paste reached the source", |stdin| { String::from_utf8_lossy(stdin).contains("\x1...
rust_dataset_chunk_512364
rust_dataset.txt
512,364
512
_source(); terminal.output(b"$ release key source\r\n"); let mut viewer = start_viewer(); show_pane( &viewer.zellij, source.session_name(), terminal.terminal_id(), ); status_shows( &viewer.zellij, "the live view is live", "release key source", ); ...
rust_dataset_chunk_512365
rust_dataset.txt
512,365
512
viewer.zellij.quit(); } #[test] fn focusing_another_pane_ends_capture() { let (source, terminal) = start_source(); terminal.output(b"$ focus source\r\n"); let mut viewer = start_viewer(); show_pane( &viewer.zellij, source.session_name(), terminal.terminal_id(), ); statu...
rust_dataset_chunk_512366
rust_dataset.txt
512,366
512
", "pinned=true source=40x10", ); pinned .zellij() .wait_until("the live view shows the whole program", |grid_snapshot| { longest_run_of(grid_snapshot, 'X') == VIEW_SIZE.0 as usize }); capture_input(pinned.zellij()); release_input(pinned.zellij()); assert_...
rust_dataset_chunk_512367
rust_dataset.txt
512,367
512
let pinned = capture_and_pin(); pinned.zellij().send_stdin(&keys::ctrl('p')); pinned.zellij().send_stdin(&keys::key('x')); pinned .zellij() .wait_until("the plugin pane is gone", |grid_snapshot| { !grid_snapshot.contains("LV ") }); wait_for_the_release( pinne...
rust_dataset_chunk_512368
rust_dataset.txt
512,368
512
in events { if let MirrorTransportEvent::Message(SourceMessage::Frame { frame, .. }) = event { let seq = zellij_utils::structured_render::decode(&frame) .expect("a readable frame") .header() .seq; assert!(viewer.send(ViewerMessage::FrameAc...
rust_dataset_chunk_512369
rust_dataset.txt
512,369
512
ays_at_its_size_when_another_viewer_closes() { let watched = start_watched_source(""); let session = watched.source.session_name().to_owned(); let pane = watched.terminal.terminal_id(); let first_size = Size { cols: 40, rows: 10 }; let second_size = Size { cols: 50, rows: 12 }; let (mut first, f...
rust_dataset_chunk_512370
rust_dataset.txt
512,370
512
) }); let client_id = client_id_of(&grid_snapshot); (client, client_id) } #[test] fn a_viewer_client_that_detaches_releases_the_pin() { let watched = start_watched_source(""); let session = watched.source.session_name().to_owned(); let pane = watched.terminal.terminal_id(); let mut viewer =...
rust_dataset_chunk_512371
rust_dataset.txt
512,371
512
third_grid.contains("after the detach") && !third_grid.contains("watched source"), "the detached client's live view is still drawn for client {}:\n{}", third_id, third_grid.text ); press_esc(&third_client); third_client.wait_until( "an esc of a client that never captured reac...
rust_dataset_chunk_512372
rust_dataset.txt
512,372
512
} release_input(pinned.zellij()); assert_keeps_the_size_after_a_barrier(&pinned.watched, VIEW_SIZE, "after capture"); let mut viewer = pinned.viewer; viewer.zellij.quit(); } #[test] fn the_most_recent_viewer_wins_and_turning_its_resizing_off_hands_the_pin_back() { let watched = start_watched_so...
rust_dataset_chunk_512373
rust_dataset.txt
512,373
512
11 }; let shown = |size: Size| MirrorAttach { focused: false, ..pinning_attach(pane, size) }; let (first, first_events) = connect_with(&session, pane, shown(first_size)); wait_for_event(&first_events, "the first pin", |event| { is_pin_state(event, true, Some(first_size)) }); ...
rust_dataset_chunk_512374
rust_dataset.txt
512,374
512
Info::Stringified( "layout {\n pane\n pane\n}\n".to_owned(), )) .skip_concurrency_slot() .start_in_background(); let first_terminal = source.expect_pty_spawn(); let second_terminal = source.expect_pty_spawn(); first_terminal.disable_echo(); second_terminal.disab...
rust_dataset_chunk_512375
rust_dataset.txt
512,375
512
assert!(!first_grid.contains("shown to the second client")); let second_grid = second_client .wait_until("the second client sees its own target", |grid_snapshot| { grid_snapshot.contains("shown to the second client") }); assert!(!second_grid.contains("shown to the first client"))...
rust_dataset_chunk_512376
rust_dataset.txt
512,376
512
(Plugin)", ); wait_for_the_pin_at( &first_terminal, VIEW_SIZE, "a shown view holds its pin after capture ends", ); send_to_the_fixture( &viewer.zellij, "live_view_clear", &[("only_client", first_id)], ); let cursor_before = source_view.snapshot().c...
rust_dataset_chunk_512377
rust_dataset.txt
512,377
512
0, "toggling without a live view must fail" ); viewer.zellij.quit(); } #[test] fn a_view_only_viewer_has_its_input_dropped_by_the_source() { let (source, terminal) = start_source(); terminal.output(b"$ view only source\r\n"); let (view_only, view_only_events) = connect_directly( ...
rust_dataset_chunk_512378
rust_dataset.txt
512,378
512
status_shows( &viewer.zellij, "the live view may not resize", "resize=false view_only=false pinned=false", ); assert_not_pinned_after_a_barrier(&watched, "first barrier"); assert_eq!( viewer.zellij.run_cli_action(CliAction::ToggleMirrorResize), 0 ); wait_for_...
rust_dataset_chunk_512379
rust_dataset.txt
512,379
512
not pinned", "resize=true view_only=false pinned=false", ); assert_not_pinned_after_a_barrier(&watched, "viewer barrier"); viewer.zellij.quit(); } #[test] fn the_toggle_action_releases_and_restores_the_pin() { let pinned = show_the_watched_source(&[]); wait_for_the_pin_at( pinned.t...
rust_dataset_chunk_512380
rust_dataset.txt
512,380
512
status_shows(&viewer.zellij, "the empty placeholder", NO_TARGET); assert_inside_the_view(&grid_snapshot, NO_TARGET); send_to_the_fixture( &viewer.zellij, "live_view_input", &[("capture", "true".to_owned())], ); status_shows( &viewer.zellij, "capture is refused wi...
rust_dataset_chunk_512381
rust_dataset.txt
512,381
512
(), ); viewer .zellij .wait_until("the live view shows the pane", |grid_snapshot| { occurrences(grid_snapshot, "about to close") >= 2 }); viewer.second_terminal.exit(Some(0)); status_shows( &viewer.zellij, "the pane closed placeholder", "The pa...
rust_dataset_chunk_512382
rust_dataset.txt
512,382
512
view shows the source pane", "session about to end", ); zellij_utils::session_link::stop_session(source.session_name(), Duration::from_secs(2)) .unwrap(); status_shows( &viewer.zellij, "the session ended placeholder", "The session ended", ); viewer.zellij.qui...
rust_dataset_chunk_512383
rust_dataset.txt
512,383
512
_takes_keys() { let (source, terminal) = start_source(); terminal.output(b"$ in a popup\r\n"); let mut zellij = TestRunner::new(TERMINAL_SIZE) .with_config("mouse_mode true") .start(); let local_terminal = zellij.expect_pty_spawn(); local_terminal.disable_echo(); local_terminal.o...
rust_dataset_chunk_512384
rust_dataset.txt
512,384
512
the popup starts capture", "captured=true", ); zellij.send_stdin(b"popup keys"); terminal.wait_for_stdin("keys reached the source", |stdin| { stdin.ends_with(b"popup keys") }); zellij.quit(); } #[test] fn shrinking_the_plugin_pane_clamps_the_view_and_a_new_rectangle_does_not_reconn...
rust_dataset_chunk_512385
rust_dataset.txt
512,385
512
", |grid_snapshot| { border_of(grid_snapshot).map(|area| (area.cols, area.rows)) == Some((20, 5)) }); assert!( grid_snapshot.contains("captured=true"), "{}", grid_snapshot.text ); assert!( grid_snapshot.contains("connects=1"), "{}", ...
rust_dataset_chunk_512386
rust_dataset.txt
512,386
512
_live_view_that_may_not_resize_leaves_the_source_client_count_and_tab_size_alone() { let watched = start_watched_source(""); let clients_before = watched.source.connected_client_count(); let mut viewer = start_viewer(); show_pane_with( &viewer.zellij, watched.source.session_name(), ...
rust_dataset_chunk_512387
rust_dataset.txt
512,387
512
ane.size(), Some(other_size), "the other pane of the source tab changed size" ); assert_eq!( other_pane.size_history().len(), other_sizes_before, "the other pane of the source tab was resized: {:?}", other_pane.size_history() ); assert_eq!(watched.source.c...
rust_dataset_chunk_512388
rust_dataset.txt
512,388
512
second"); viewer.zellij.send_stdin(&keys::ctrl('p')); viewer.zellij.send_stdin(&keys::key('c')); viewer.zellij.send_stdin(b"QZPANE"); viewer.zellij.send_stdin(b"\x1by"); viewer .zellij .wait_until("the plugin pane is renamed", |grid_snapshot| { grid_snapshot.contains("QZP...
rust_dataset_chunk_512389
rust_dataset.txt
512,389
512
newly focused pane", || { viewer.first_terminal.stdin_bytes().ends_with(b"x") || viewer.second_terminal.stdin_bytes().ends_with(b"x") }); status_shows( &viewer.zellij, "the focus change ends capture", "released=Some(FocusLost)", ); let stdin = terminal.stdin_...
rust_dataset_chunk_512390
rust_dataset.txt
512,390
512
|stdin| { String::from_utf8_lossy(stdin).contains(&format!("\x1b[<0;{}m", clamped)) }); assert!( String::from_utf8_lossy(&stdin).contains(&format!("\x1b[<32;{}M", clamped)), "the motion outside the rectangle was not clamped: {:?}", String::from_utf8_lossy(&stdin) ); let ...
rust_dataset_chunk_512391
rust_dataset.txt
512,391
512
key ends capture", "released=Some(Key)", ); terminal.wait_for_stdin("the source gets the button released", |stdin| { String::from_utf8_lossy(stdin).contains("\x1b[<0;5;2m") }); viewer.zellij.quit(); } fn pinned_cover_layout(main_pane: &str) -> String { format!( r#" ...
rust_dataset_chunk_512392
rust_dataset.txt
512,392
512
(|(column, row)| area.contains(*column, *row)) .unwrap_or_else(|| { panic!( "no pinned pane covers the rectangle:\n{}", grid_snapshot.text ) }); type_and_wait_for_the_source(&viewer.zellij, &terminal, "barrier"); viewer .zellij ...
rust_dataset_chunk_512393
rust_dataset.txt
512,393
512
", ); let stdin = terminal.stdin_bytes(); assert!( stdin.is_empty(), "input reached the source without capture: {:?}", String::from_utf8_lossy(&stdin) ); viewer.zellij.quit(); } #[test] fn a_popup_starts_capture_through_the_api_shows_the_cursor_over_a_pinned_pane_and_release...
rust_dataset_chunk_512394
rust_dataset.txt
512,394
512
: None, }, CliCaller::from_pane(local_terminal.terminal_id()), ); let grid_snapshot = zellij.wait_until( "the popup shows the fixture or its permission prompt", |grid_snapshot| grid_snapshot.contains("in a popup") || grid_snapshot.contains("(y/n)"), ); if grid_snapshot.co...
rust_dataset_chunk_512395
rust_dataset.txt
512,395
512
_terminal_is_too_small() { let mut zellij = TestRunner::new(Size { cols: 8, rows: 20 }).start(); let terminal = zellij.expect_pty_spawn(); terminal.output(PROMPT); zellij.wait_until("first terminal prompt rendered", |grid_snapshot| { grid_snapshot.cursor_is_at(col(2).row(1)) }); let (wid...
rust_dataset_chunk_512396
rust_dataset.txt
512,396
512
)) && grid_snapshot.contains("LOCK") && grid_snapshot.contains("(FULLSCREEN)") }); assert_snapshot!(normalized(&grid_snapshot)); zellij.quit(); } #[test] fn new_pane_while_fullscreen_breaks_out_of_fullscreen() { let mut zellij = start_zellij(); claim_first_terminal_and_wait_...
rust_dataset_chunk_512397
rust_dataset.txt
512,397
512
)") }); zellij.send_stdin(&keys::ctrl('p')); zellij.send_stdin(&keys::key('x')); let after_close = zellij.wait_until( "fullscreen pane closed, two panes restored", |grid_snapshot| { !grid_snapshot.contains("(FULLSCREEN)") && grid_snapshot.status_bar_appears()...
rust_dataset_chunk_512398
rust_dataset.txt
512,398
512
_terminal_and_wait_for_prompt(&zellij); zellij.send_stdin(&keys::ctrl('p')); zellij.send_stdin(&keys::key('w')); let floating_terminal = zellij.expect_pty_spawn(); floating_terminal.output(PROMPT); let grid_snapshot = zellij.wait_until("floating pane appeared", |grid_snapshot| { grid_snaps...
rust_dataset_chunk_512399
rust_dataset.txt
512,399
512
].find(label) { Some(offset) => search_from += offset + label.len(), None => return false, } } true } #[test] fn move_focus_up_in_pane_mode() { let mut zellij = start_zellij(); claim_first_terminal_and_wait_for_prompt(&zellij); split_down_and_wait_for_prompt(&zellij)...