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_512200 | rust_dataset.txt | 512,200 | 512 | &other, "not resized", "off");
start_typing(&zellij);
type_into(&zellij, &terminal, "pinned");
terminal.wait_for_size(
"typing resizes the source to the view with resizing off",
|cols, rows| (cols, rows) == view_size,
);
source_client.wait_until("the source shows the pin marker", |g... |
rust_dataset_chunk_512201 | rust_dataset.txt | 512,201 | 512 | _session("$ pane of the newer item", "Newer?");
wait_for_count(&zellij, 2);
let second = zellij.attach_client(TERMINAL_SIZE);
second.wait_until("the second client is attached", |grid_snapshot| {
grid_snapshot.status_bar_appears()
});
second.send_stdin(&keys::ctrl('t'));
second.send_stdin... |
rust_dataset_chunk_512202 | rust_dataset.txt | 512,202 | 512 | leared(
zellij: &TestSession,
terminal: &FakePtyHandle,
layout_size: (u16, u16),
what: &str,
text: &str,
) {
zellij.wait_until(what, |grid_snapshot| {
!grid_snapshot.contains(text) && !grid_snapshot.contains(TYPING_INTO)
});
terminal.wait_for_size(
"the source gets its la... |
rust_dataset_chunk_512203 | rust_dataset.txt | 512,203 | 512 | grid_snapshot.contains(TYPE_INTO_IT)
},
);
start_typing(&zellij);
zellij.main_client().send_action(Action::ToggleSessionCard);
zellij.wait_until(
"the inbox action while typing stops typing",
|grid_snapshot| !grid_snapshot.contains(TYPING_INTO) && shows_inbox(grid_snapshot),
... |
rust_dataset_chunk_512204 | rust_dataset.txt | 512,204 | 512 | ellij,
&terminal,
layout_size,
"hiding the floating panes while typing clears the view",
text,
);
zellij.send_stdin(&keys::alt('f'));
wait_for_the_view_of(&zellij, &other, text);
source_client.detach();
zellij.quit();
}
#[test]
fn a_closing_source_pane_shows_the_clos... |
rust_dataset_chunk_512205 | rust_dataset.txt | 512,205 | 512 | _appears() && grid_snapshot.cursor.is_some()
});
let (other, _) = item_session("$ never drawn when narrow", "Narrow?");
wait_for_count(&zellij, 1);
let grid_snapshot = open_inbox_on(&zellij, "Narrow?");
assert!(
grid_snapshot.contains("<ENTER> go there"),
"{}",
grid_snapshot.... |
rust_dataset_chunk_512206 | rust_dataset.txt | 512,206 | 512 | .send_stdin(&keys::TAB);
wait_for_the_view_of(&panel, &other, "panel source");
panel.send_stdin(&keys::ESC);
assert!(panel.join_main_client().is_none());
let reused = panel.attach_client(TERMINAL_SIZE);
reused.wait_until("the reused panel shows the live view", |grid_snapshot| {
shown_inside_... |
rust_dataset_chunk_512207 | rust_dataset.txt | 512,207 | 512 | ) = card
.position_of("Open inbox")
.expect("the card offers the inbox");
zellij.send_stdin(&keys::sgr_click(column + 1, row));
wait_for_the_view_of(&zellij, &other, "not on the card");
zellij.quit();
}
fn failed_command(terminal: &FakePtyHandle, command: &str, exit: &str) {
terminal.ou... |
rust_dataset_chunk_512208 | rust_dataset.txt | 512,208 | 512 | (asking, _) = item_session("$ asking", "Group me?");
let watched_row = row_of("◉", watched.session_name());
let failed_row = row_of("✗", failed.session_name());
let asking_row = row_of("●", asking.session_name());
zellij_integration_tests::attention::wait_for_counted(failed.session_name(), 1);
wait... |
rust_dataset_chunk_512209 | rust_dataset.txt | 512,209 | 512 | _for_the_view_of(&zellij, &other, "escape here");
let grid_snapshot = zellij.snapshot();
assert!(
grid_snapshot.contains(TYPE_INTO_IT),
"{}",
grid_snapshot.text
);
start_typing(&zellij);
assert!(zellij.snapshot().contains("<Alt ENTER> or click"));
press_esc(&zellij);
... |
rust_dataset_chunk_512210 | rust_dataset.txt | 512,210 | 512 | _INTO) && shows_inbox(&grid_snapshot),
"g or the right arrow did something:\n{}",
grid_snapshot.text
);
zellij.send_stdin(&keys::UP);
wait_for_the_view_of(&zellij, &newer, "the newer pane");
zellij.send_stdin(&keys::ALT_ENTER_KITTY);
zellij.wait_until("kitty encoded alt enter starts ... |
rust_dataset_chunk_512211 | rust_dataset.txt | 512,211 | 512 | ,
) -> (u16, u16) {
let grid_snapshot = wait_for_the_view_of(zellij, session, text);
let area = view_area(&grid_snapshot, session.session_name()).unwrap();
(area.cols as u16, area.rows as u16)
}
#[test]
fn browsing_with_z_on_resizes_a_pane_once_it_settles_and_it_keeps_that_size_until_focused_in_its_session... |
rust_dataset_chunk_512212 | rust_dataset.txt | 512,212 | 512 | #[test]
fn typing_into_a_shown_pane_in_its_own_session_gives_its_size_back_until_typing_through_the_view() {
let (mut zellij, _) = main_session();
let (session, terminal) = two_pane_item_session("typed in place", "Local?");
let source_client = session.attach_client(TERMINAL_SIZE);
source_client.wait_unt... |
rust_dataset_chunk_512213 | rust_dataset.txt | 512,213 | 512 | ("browsing says resizing is off", |grid_snapshot| {
grid_snapshot.contains("resize off")
});
std::thread::sleep(Duration::from_millis(700));
assert_not_pinned_after_a_barrier(&source_client, &terminal, layout_size, "while browsing");
start_typing(&zellij);
terminal.wait_for_size("typing resi... |
rust_dataset_chunk_512214 | rust_dataset.txt | 512,214 | 512 | .unwrap_or(false)
});
let watched_row = row_of("◉", watched.session_name());
open_inbox(&zellij);
zellij.wait_until("the inbox lists the watched pane", |grid_snapshot| {
grid_snapshot.contains(&watched_row)
});
zellij.send_stdin(&keys::INBOX_KEY);
zellij.wait_until("the browser is c... |
rust_dataset_chunk_512215 | rust_dataset.txt | 512,215 | 512 | ellij, 1);
let (newer, newer_terminal) = item_session("$ the newer pane", "Newer?");
wait_for_count(zellij, 2);
open_inbox_on(zellij, "Newer?");
wait_for_the_view_of(zellij, &newer, "the newer pane");
(newer, newer_terminal, older)
}
#[test]
fn a_click_on_the_selected_row_while_typing_ends_typing_w... |
rust_dataset_chunk_512216 | rust_dataset.txt | 512,216 | 512 | ")
.expect("the list is drawn");
zellij.send_stdin(format!("\u{1b}[<65;{};{}M", column + 1, row + 2).as_bytes());
type_into(&zellij, &newer_terminal, "y");
press_release_key(&zellij);
zellij.wait_until("typing ended", |grid_snapshot| {
!grid_snapshot.contains(TYPING_INTO) && grid_snapsho... |
rust_dataset_chunk_512217 | rust_dataset.txt | 512,217 | 512 | ", "Between?");
wait_for_count(&zellij, 1);
open_inbox_on(&zellij, "Between?");
wait_for_the_view_of(&zellij, &other, "bound key between");
start_typing(&zellij);
let mut presses = keys::ESC_KEY.to_vec();
presses.extend_from_slice(&keys::ctrl('g'));
presses.extend_from_slice(&keys::ESC_KEY);... |
rust_dataset_chunk_512218 | rust_dataset.txt | 512,218 | 512 | ●", other.session_name()))
.expect("the selected row is drawn");
zellij.send_stdin(&keys::sgr_click(column + 2, row));
let (switch, _previous) = zellij.follow_switch_into(other);
assert_eq!(switch.pane_id, Some((terminal.terminal_id(), false)));
zellij.wait_until("the switched client is attached... |
rust_dataset_chunk_512219 | rust_dataset.txt | 512,219 | 512 | _terminal) = item_session("$ the first item", "First?");
wait_for_count(&zellij, 3);
let first_layout = layout_size_of(&first_terminal);
let second_layout = layout_size_of(&second_terminal);
let third_layout = layout_size_of(&third_terminal);
open_inbox_on(&zellij, "First?");
let view_size = sho... |
rust_dataset_chunk_512220 | rust_dataset.txt | 512,220 | 512 | (mut zellij, _) = main_session();
let (older, older_terminal) = item_session("$ the older pane", "Older?");
wait_for_count(&zellij, 1);
let (newer, newer_terminal) = item_session("$ the newer pane", "Newer?");
wait_for_count(&zellij, 2);
let older_layout = layout_size_of(&older_terminal);
let n... |
rust_dataset_chunk_512221 | rust_dataset.txt | 512,221 | 512 | size back",
|cols, rows| (cols, rows) == older_layout,
);
zellij.quit();
}
fn browse_to_a_failed_item_until_it_is_seen(
zellij: &TestSession,
) -> (BackgroundTestSession, BackgroundTestSession, String) {
let (failed, failed_terminal) = background_session_with(ATTENTION_CONFIG);
failed_term... |
rust_dataset_chunk_512222 | rust_dataset.txt | 512,222 | 512 | , "the asking pane");
zellij.send_stdin(&keys::DOWN);
let grid_snapshot = wait_for_the_view_of(&zellij, &failed, "the failed pane");
assert!(
grid_snapshot.contains(&failed_row),
"browsing away and back dropped the seen item:\n{}",
grid_snapshot.text
);
zellij.send_stdin(&key... |
rust_dataset_chunk_512223 | rust_dataset.txt | 512,223 | 512 | Rebound?")
});
wait_for_the_view_of(&zellij, &other, "rebound");
start_typing(&zellij);
assert!(zellij.snapshot().contains("<Alt ENTER> or click"));
zellij.send_stdin(&keys::F9);
type_into(&zellij, &terminal, "after");
assert!(
String::from_utf8_lossy(&terminal.stdin_bytes()).contain... |
rust_dataset_chunk_512224 | rust_dataset.txt | 512,224 | 512 | from_utf8_lossy(&terminal.stdin_bytes())
);
start_typing(&zellij);
zellij.send_stdin(&keys::INBOX_KEY);
zellij.wait_until("the inbox key also stops typing", |grid_snapshot| {
shows_inbox(grid_snapshot)
&& !grid_snapshot.contains(TYPING_INTO)
&& grid_snapshot.contains(TYPE... |
rust_dataset_chunk_512225 | rust_dataset.txt | 512,225 | 512 | zellij_utils::session_link::stop_session(failed.session_name(), Duration::from_secs(2))
.unwrap();
zellij.wait_until("the held item goes with its session", |grid_snapshot| {
!grid_snapshot.contains(&failed_row)
&& shown_inside_the_view(grid_snapshot, asking.session_name(), "the asking p... |
rust_dataset_chunk_512226 | rust_dataset.txt | 512,226 | 512 | , got {:?}", other),
}
}
fn runs_initial_command(terminal: &FakePtyHandle) -> bool {
command_line_of(terminal)
.first()
.is_some_and(|command| command.ends_with("initial-command"))
}
fn wait_for_loaded_app(zellij: &TestSession) {
zellij.wait_until("app loaded", |grid_snapshot| {
gr... |
rust_dataset_chunk_512227 | rust_dataset.txt | 512,227 | 512 | _command(&["initial-command"])
.start();
let first_tab_terminal = zellij.expect_pty_spawn();
let second_tab_terminal = zellij.expect_pty_spawn();
first_tab_terminal.output(b"unfocused tab shell\r\n");
second_tab_terminal.output(b"initial-command output\r\n");
assert!(
!runs_initial... |
rust_dataset_chunk_512228 | rust_dataset.txt | 512,228 | 512 | ("default shell prompt rendered", |grid_snapshot| {
grid_snapshot.status_bar_appears() && grid_snapshot.cursor_is_at(col(2).row(1))
});
zellij.quit();
}
--- FILE: zellij/zellij-integration-tests/tests/input_fragmentation.rs ---
#![cfg(unix)]
use std::thread::sleep;
use std::time::{Duration, Instant};... |
rust_dataset_chunk_512229 | rust_dataset.txt | 512,229 | 512 | {
let mut zellij = start_zellij();
let terminal = claim_first_terminal_and_wait_for_prompt(&zellij);
terminal.disable_echo();
lock_interface(&zellij);
zellij.send_stdin(b"\x1b[");
sleep(IDLE_BEYOND_SHORT_FLUSH);
zellij.send_stdin(b"1;");
sleep(IDLE_BEYOND_SHORT_FLUSH);
zellij.send_... |
rust_dataset_chunk_512230 | rust_dataset.txt | 512,230 | 512 | .send_stdin(b"\x1b]");
let pane_stdin = terminal.wait_for_stdin("the bare Alt+] reached the pane", |stdin_bytes| {
contains_subslice(stdin_bytes, b"\x1b]")
});
let elapsed = sent_at.elapsed();
assert_eq!(
pane_stdin, b"\x1b]",
"only the Alt+] bytes may reach the pane"
);
... |
rust_dataset_chunk_512231 | rust_dataset.txt | 512,231 | 512 | keys::BRACKETED_PASTE_END);
let pane_stdin = terminal.wait_for_stdin("the whole paste reached the pane", |stdin_bytes| {
contains_subslice(stdin_bytes, &payload)
});
assert_eq!(
occurrences_of(&pane_stdin, &payload),
1,
"the paste must reach the pane exactly once"
);
... |
rust_dataset_chunk_512232 | rust_dataset.txt | 512,232 | 512 | _no_keystrokes() {
let mut zellij = start_zellij();
let terminal = claim_first_terminal_and_wait_for_prompt(&zellij);
terminal.disable_echo();
lock_interface(&zellij);
zellij.send_stdin(b"\x1b[200~clip\x1b[201");
sleep(IDLE_BEYOND_LONE_ESC_FLUSH);
zellij.send_stdin(b"~");
sleep(IDLE_BEY... |
rust_dataset_chunk_512233 | rust_dataset.txt | 512,233 | 512 | _stdin(&keys::ENTER);
}
fn open_keys_page(zellij: &TestSession) {
wait_for_settings(zellij);
for _ in 0..KEYBOARD_CATEGORY {
zellij.send_stdin(ARROW_DOWN);
}
open_keys_link(zellij);
}
fn open_keys_screen(zellij: &TestSession) {
open_keys_page(zellij);
zellij.wait_until("keys screen ope... |
rust_dataset_chunk_512234 | rust_dataset.txt | 512,234 | 512 | c'));
open_keys_screen(&zellij);
choose_preset(&zellij, ARROW_DOWN, "UNLOCK");
close_configuration(&zellij);
zellij.send_stdin(&keys::ctrl('g'));
let grid_snapshot = wait_for_unlock_first_status_bar(&zellij);
assert_snapshot!(normalized(&grid_snapshot));
zellij.send_stdin(&keys::key('o'));... |
rust_dataset_chunk_512235 | rust_dataset.txt | 512,235 | 512 | {
let mut zellij = TestRunner::new(TERMINAL_SIZE)
.with_config(
r#"
keybinds clear-defaults=true {
normal {
bind "Ctrl y" { NewTab; }
}
shared {
bind "Ctrl q" { Quit; }
}
}
"#,
)
.start();
let terminal = zellij.expect_pty_spawn();
terminal... |
rust_dataset_chunk_512236 | rust_dataset.txt | 512,236 | 512 | .contains("unlock-first")
&& grid_snapshot.contains("0 unsaved changes")
},
);
zellij.send_stdin(&keys::ctrl('a'));
zellij.wait_until("config saved", |grid_snapshot| {
grid_snapshot.contains("Saved to")
});
let written = std::fs::read_to_string(zellij.config_file_pat... |
rust_dataset_chunk_512237 | rust_dataset.txt | 512,237 | 512 | _until("default preset applied in normal mode", |grid_snapshot| {
grid_snapshot.contains("Ctrl p to enter PANE mode") && grid_snapshot.status_bar_appears()
});
zellij.send_stdin(&keys::ctrl('a'));
zellij.wait_until("config saved", |grid_snapshot| {
grid_snapshot.contains("Saved to")
});... |
rust_dataset_chunk_512238 | rust_dataset.txt | 512,238 | 512 | keys::TAB);
zellij.wait_until(
"the keybindings below the preset are focused",
|grid_snapshot| grid_snapshot.contains("search keys and actions"),
);
for _ in 0..4 {
zellij.send_stdin(&keys::TAB);
}
zellij.wait_until("focus went back to the keys link", |grid_snapshot| {
... |
rust_dataset_chunk_512239 | rust_dataset.txt | 512,239 | 512 | column, line).as_bytes());
}
#[test]
fn a_preset_from_the_keybinds_folder_links_to_its_file() {
let keybinds_dir = tempfile::tempdir().unwrap();
let preset_path = keybinds_dir.path().join("mine.kdl");
std::fs::write(
&preset_path,
"preset {\n description \"My own keys\"\n}\nkeybinds {\n... |
rust_dataset_chunk_512240 | rust_dataset.txt | 512,240 | 512 | = format!("{:?}", editor.terminal_action());
let folder_name = keybinds_dir.path().file_name().unwrap().to_str().unwrap();
assert!(
action.contains(&format!("{}/mine.kdl", folder_name)),
"{}",
action
);
zellij.quit();
}
#[test]
fn the_keys_page_fits_its_fields_at_the_default_s... |
rust_dataset_chunk_512241 | rust_dataset.txt | 512,241 | 512 | ACK_ON_KEYS_LINK) && grid_snapshot.contains(KEYS_LINK)
},
);
zellij.quit();
}
#[test]
fn the_preset_folder_set_on_the_files_page_lists_its_presets_on_the_keys_page() {
let keybinds_dir = tempfile::tempdir().unwrap();
std::fs::write(
keybinds_dir.path().join("from-new-folder.kdl"),
... |
rust_dataset_chunk_512242 | rust_dataset.txt | 512,242 | 512 | "the preset list shows the new folder's preset",
|grid_snapshot| grid_snapshot.contains("from-new-folder"),
);
zellij.quit();
}
#[test]
fn a_command_line_preset_overrides_an_old_config_that_clears_the_defaults() {
let mut zellij = TestRunner::new(TERMINAL_SIZE)
.with_config(
... |
rust_dataset_chunk_512243 | rust_dataset.txt | 512,243 | 512 | _Ga=t,q=2,f=32,t=d,i=2000000000,s=2,v=2,m=0;";
const PLACEMENT: &[u8] = b"\x1b_Ga=p,q=2,i=2000000000,p=1,x=0,y=0,w=2,h=2,X=0,Y=0,z=0,C=1\x1b\\";
const IMAGE_FREE_DELETE: &[u8] = b"\x1b_Ga=d,q=2,d=I,i=2000000000\x1b\\";
const PLACEMENT_DELETE: &[u8] = b"\x1b_Ga=d,q=2,d=i,i=2000000000,p=1\x1b\\";
const RGB_2X2_A_T: &[u8]... |
rust_dataset_chunk_512244 | rust_dataset.txt | 512,244 | 512 | {
out.push(TABLE[((triple >> 6) & 0x3f) as usize] as char);
} else {
out.push('=');
}
if chunk.len() > 2 {
out.push(TABLE[(triple & 0x3f) as usize] as char);
} else {
out.push('=');
}
}
out
}
fn contains_bytes(haystack: &[... |
rust_dataset_chunk_512245 | rust_dataset.txt | 512,245 | 512 | ();
let before_placement = &bytes[..placement_position];
let prompt_cursor_zero_indexed = (2usize, 1usize);
let expected_goto_row = prompt_cursor_zero_indexed.1 + 1;
let expected_goto_column = prompt_cursor_zero_indexed.0 + 1;
let expected_prefix = format!("\x1b[{};{}H\x1b[m", expected_goto_row, exp... |
rust_dataset_chunk_512246 | rust_dataset.txt | 512,246 | 512 | _row_scrolls_and_reaches_client() {
let mut zellij = start_zellij();
let terminal = claim_first_terminal_and_wait_for_prompt(&zellij);
setup_kitty_host(&zellij, &terminal);
let mut fill = Vec::new();
for _ in 0..64 {
fill.extend_from_slice(b"\r\n");
}
terminal.output(&fill);
ter... |
rust_dataset_chunk_512247 | rust_dataset.txt | 512,247 | 512 | zellij.send_stdin(&keys::ctrl('p'));
zellij.send_stdin(&keys::key('x'));
zellij.wait_until_raw_output("host-side image delete after pane close", |bytes| {
contains_bytes(bytes, IMAGE_FREE_DELETE)
});
zellij.quit();
let bytes = zellij.raw_bytes();
let delete_position = find_bytes(&byt... |
rust_dataset_chunk_512248 | rust_dataset.txt | 512,248 | 512 | const CELL_WIDTH: usize = 8;
const CELL_HEIGHT: usize = 21;
const IMAGE_CELL_X: usize = 20;
const IMAGE_CELL_Y: usize = 3;
const IMAGE_CELL_WIDTH: usize = 30;
const IMAGE_CELL_HEIGHT: usize = 7;
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
struct CellRect {
cell_y: usize,
cell_x: usize,
ce... |
rust_dataset_chunk_512249 | rust_dataset.txt | 512,249 | 512 | n(2, '=');
let key = parts.next().unwrap_or("");
let value = parts.next().unwrap_or("");
match key {
"p" => placement_id = value.parse().expect("placement id"),
"w" => source_width = value.parse().expect("placement width"),
"h" => sourc... |
rust_dataset_chunk_512250 | rust_dataset.txt | 512,250 | 512 | ,
cell_width: right - left + 1,
cell_height: bottom - top + 1,
}
}
fn uncovered_parts(image: CellRect, cover: CellRect) -> Vec<CellRect> {
if !image.intersects(&cover) {
return vec![image];
}
let image_bottom = image.cell_y + image.cell_height;
let image_right = image.cell_x... |
rust_dataset_chunk_512251 | rust_dataset.txt | 512,251 | 512 | ).as_bytes());
terminal.output(&scaled_rgb_transmit_and_display(
IMAGE_CELL_WIDTH,
IMAGE_CELL_HEIGHT,
));
let bytes = zellij
.wait_until_raw_output("the full image placement reaches the host", |bytes| {
!host_placements(bytes).is_empty()
});
assert_eq!(
... |
rust_dataset_chunk_512252 | rust_dataset.txt | 512,252 | 512 | ),
"the full-image placement must no longer be emitted while the floating pane covers it"
);
let surplus_placement_ids: Vec<u32> = occluded_placements
.iter()
.map(|(_, placement_id)| *placement_id)
.filter(|placement_id| *placement_id != 1)
.collect();
assert!(
... |
rust_dataset_chunk_512253 | rust_dataset.txt | 512,253 | 512 | the protocol is disabled"
);
assert!(
terminal.stdin_bytes().is_empty(),
"a disabled protocol must not reply to the application at all, got: {:?}",
terminal.stdin_bytes()
);
zellij.quit();
}
#[test]
fn pinned_floating_pane_keeps_its_image_when_floating_panes_are_toggled_off() ... |
rust_dataset_chunk_512254 | rust_dataset.txt | 512,254 | 512 | ::io::Write as _;
let mut zellij = start_zellij();
let terminal = claim_first_terminal_and_wait_for_prompt(&zellij);
setup_kitty_host(&zellij, &terminal);
terminal.output(b"\x1b_Gi=31,s=1,v=1,a=q,t=d,f=24;AAAA\x1b\\\x1b[c");
terminal.wait_for_stdin("viu remote support probe answered", |stdin_bytes... |
rust_dataset_chunk_512255 | rust_dataset.txt | 512,255 | 512 | 0")
&& contains_bytes(bytes, b"\x1b_Ga=p,q=2,i=2000000000,p=1,")
});
zellij.quit();
}
#[test]
fn fullscreen_removes_the_images_of_the_panes_it_hides() {
let mut zellij = start_zellij();
let terminal = claim_first_terminal_and_wait_for_prompt(&zellij);
setup_kitty_host(&zellij, &termina... |
rust_dataset_chunk_512256 | rust_dataset.txt | 512,256 | 512 | grid_snapshot.contains("About Zellij")
});
}
fn press_launch_or_focus_three_times(zellij: &TestSession, launch_keys: &[&[u8]]) {
for _ in 0..3 {
for key in launch_keys {
zellij.send_stdin(key);
}
zellij.wait_until("session manager shown", |grid_snapshot| {
... |
rust_dataset_chunk_512257 | rust_dataset.txt | 512,257 | 512 | _and_wait_for_prompt(&zellij);
focus_the_about_plugin(&zellij);
press_launch_or_focus_three_times(&zellij, &[&keys::ctrl('o'), &keys::key('w')]);
assert_one_session_manager(&zellij);
zellij.quit();
}
#[test]
fn launch_or_focus_plugin_with_an_alias_and_a_plugin_setting_reuses_the_running_instance() {
... |
rust_dataset_chunk_512258 | rust_dataset.txt | 512,258 | 512 | 3,
"\n{}",
grid_snapshot.text
);
zellij.quit();
}
--- FILE: zellij/zellij-integration-tests/tests/misc.rs ---
#![cfg(unix)]
use insta::assert_snapshot;
use zellij_integration_tests::{
claim_first_terminal_and_wait_for_prompt, col, keys, normalized,
split_right_and_wait_for_prompt, sta... |
rust_dataset_chunk_512259 | rust_dataset.txt | 512,259 | 512 | split_right_and_wait_for_prompt(&zellij);
zellij.send_stdin(&keys::alt('P'));
let grid_snapshot = zellij.wait_until("group marking engaged", |grid_snapshot| {
grid_snapshot.contains("GROUP ACTIONS")
&& grid_snapshot.contains("SELECTED PANE")
&& grid_snapshot.contains("Follow F... |
rust_dataset_chunk_512260 | rust_dataset.txt | 512,260 | 512 | :");
let border_left = draws_a_popup_border(grid_snapshot);
if text_gone && border_left {
broken_frames.borrow_mut().push(grid_snapshot.text.clone());
}
grid_snapshot.status_bar_appears() && text_gone && !border_left
});
let broken_frames = broken_frames.into_inner();... |
rust_dataset_chunk_512261 | rust_dataset.txt | 512,261 | 512 | _prompt(&zellij);
zellij.send_stdin(&keys::ctrl('t'));
let grid_snapshot = zellij.wait_until("tab mode active", |grid_snapshot| {
grid_snapshot.contains("TAB") && !grid_snapshot.contains("LOCK")
});
assert_snapshot!(normalized(&grid_snapshot));
zellij.quit();
}
#[test]
fn switch_to_resize... |
rust_dataset_chunk_512262 | rust_dataset.txt | 512,262 | 512 | let grid_snapshot = zellij.wait_until("search input mode active", |grid_snapshot| {
grid_snapshot.contains("ENTERING SEARCH TERM") && !grid_snapshot.contains("LOCK")
});
assert_snapshot!(normalized(&grid_snapshot));
zellij.quit();
}
#[test]
fn switch_to_search_mode() {
let mut zellij = start_z... |
rust_dataset_chunk_512263 | rust_dataset.txt | 512,263 | 512 | });
let grid_snapshot =
zellij.wait_until("forwarded keys rendered in locked pane", |grid_snapshot| {
grid_snapshot.contains("abc")
&& !grid_snapshot.contains("PANE")
&& !grid_snapshot.contains("Tab #2")
});
assert_snapshot!(normalized(&grid_snapsh... |
rust_dataset_chunk_512264 | rust_dataset.txt | 512,264 | 512 | ED_PASTE_START);
zellij.send_stdin(b"hello\x1b[201~");
zellij.send_stdin(&keys::key('x'));
terminal.wait_for_stdin(
"keystroke following a split bracketed paste reached the pane unshifted",
|stdin_bytes| stdin_bytes.windows(6).any(|window| window == b"hellox"),
);
zellij.quit();
}
... |
rust_dataset_chunk_512265 | rust_dataset.txt | 512,265 | 512 | _snapshot| {
grid_snapshot.status_bar_appears() && grid_snapshot.cursor_is_at(col(62).row(2))
});
for line in 1..=22 {
right_terminal.output(format!("line{}\r\n", line).as_bytes());
}
zellij.wait_until("right terminal filled past its viewport", |grid_snapshot| {
grid_snapshot.co... |
rust_dataset_chunk_512266 | rust_dataset.txt | 512,266 | 512 | , column: usize, line: usize) {
click(zellij, column, line, 0);
click(zellij, 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].... |
rust_dataset_chunk_512267 | rust_dataset.txt | 512,267 | 512 | let column = column_of(&grid_snapshot, row, title).unwrap();
double_click(zellij, column + 1 + offset, row + 1);
}
fn is_wide(cols: u16) -> bool {
cols > 100
}
#[test]
fn double_clicking_a_tiled_pane_frame_toggles_fullscreen() {
let mut zellij = start_with_full_frames();
let left_terminal = claim_... |
rust_dataset_chunk_512268 | rust_dataset.txt | 512,268 | 512 | );
floating_terminal.wait_for_size("floating pane left fullscreen", |cols, _| !is_wide(cols));
zellij.wait_until("the tiled pane shows again", |grid_snapshot| {
grid_snapshot.contains("FLOAT-MARKER") && grid_snapshot.contains("TILED-MARKER")
});
zellij.quit();
}
fn lock_interface(zellij: &TestS... |
rust_dataset_chunk_512269 | rust_dataset.txt | 512,269 | 512 | .text);
zellij.kill_session();
}
#[test]
fn cleared_locked_mouse_bindings_stop_right_click_from_opening_the_menu() {
let mut zellij = TestRunner::new(TERMINAL_SIZE)
.with_config(LOCKED_PASS_THROUGH_CONFIG)
.start();
let terminal = claim_first_terminal_and_wait_for_prompt(&zellij);
lock_... |
rust_dataset_chunk_512270 | rust_dataset.txt | 512,270 | 512 | && grid_snapshot.status_bar_appears()
});
assert!(!String::from_utf8_lossy(&terminal.stdin_bytes()).contains("Renamed"));
zellij.quit();
}
#[test]
fn double_clicking_empty_tab_bar_space_opens_a_new_tab() {
let mut zellij = start_with_mouse();
claim_first_terminal_and_wait_for_prompt(&ze... |
rust_dataset_chunk_512271 | rust_dataset.txt | 512,271 | 512 | ane_with_mouse() {
let mut zellij = start_zellij();
claim_first_terminal_and_wait_for_prompt(&zellij);
let right_terminal = split_right_and_wait_for_prompt(&zellij);
for line in 1..=21 {
right_terminal.output(format!("line{}\r\n", line).as_bytes());
}
zellij.wait_until("right pane fille... |
rust_dataset_chunk_512272 | rust_dataset.txt | 512,272 | 512 | && grid_snapshot.contains("PIN [+]")
&& grid_snapshot.contains("line13")
},
);
assert_snapshot!(normalized(&grid_snapshot));
zellij.quit();
}
--- FILE: zellij/zellij-integration-tests/tests/nested_fullscreen.rs ---
#![cfg(unix)]
use insta::assert_snapshot;
use zellij_integration_... |
rust_dataset_chunk_512273 | rust_dataset.txt | 512,273 | 512 | })
}
fn guest_ui_settled(guest_grid: &GridSnapshot) -> bool {
let lines = guest_grid.lines();
lines
.first()
.map_or(false, |first_line| first_line.contains("Tab #1"))
&& last_line_contains(guest_grid, "Ctrl +")
&& guest_normal_mode_bar_settled(guest_grid)
}
fn guest_fullsc... |
rust_dataset_chunk_512274 | rust_dataset.txt | 512,274 | 512 | nested.inner.wait_for_app_load();
nested
.inner
.wait_until("inner settled in normal mode", guest_ui_settled);
}
fn enter_fullscreen_from_descended_inner(nested: &NestedDepthThreeHarness) {
nested.outer.send_stdin(&keys::ctrl('o'));
nested.inner.wait_until(
"inner entered session m... |
rust_dataset_chunk_512275 | rust_dataset.txt | 512,275 | 512 | let expected_breadcrumb = breadcrumb_for(&[&host_session_name], &guest_session_name);
let before_fullscreen =
nested
.host
.wait_until("host chrome present before fullscreen", |host_grid| {
host_grid.status_bar_appears()
&& host_grid.tab_bar_appe... |
rust_dataset_chunk_512276 | rust_dataset.txt | 512,276 | 512 | breadcrumb gone from the host tab-bar after fullscreen exit"
);
}
#[test]
fn fullscreen_state_reaches_the_guest_on_enter_and_exit() {
let nested = NestedHarness::start(TERMINAL_SIZE);
boot_and_descend_on_first_load(&nested);
let entered = nested.mark_host_to_guest();
enter_fullscreen_from_descend... |
rust_dataset_chunk_512277 | rust_dataset.txt | 512,277 | 512 | on the guest tab-bar before fullscreen"
);
enter_fullscreen_from_descended_guest(&nested);
let expected_breadcrumb = breadcrumb_for(&[&host_session_name], &guest_session_name);
let fullscreened = nested.guest.wait_until(
"guest tab-bar shows the breadcrumb while fullscreened",
|guest_... |
rust_dataset_chunk_512278 | rust_dataset.txt | 512,278 | 512 | let tiled = nested
.guest
.wait_until("nested guest tab-bar settled while tiled", guest_ui_settled);
assert!(
tiled
.lines()
.first()
.map_or(true, |first_line| { !first_line.contains('▸') }),
"a nested but not fullscreened guest shows no bread... |
rust_dataset_chunk_512279 | rust_dataset.txt | 512,279 | 512 | (
middle_told,
"middle tells the inner it is in host fullscreen",
|message| {
matches!(
message,
NestedSessionMessage::FullscreenState { fullscreen: true }
)
},
);
let expected_breadcrumb = breadcrumb_for(
&[&outer_... |
rust_dataset_chunk_512280 | rust_dataset.txt | 512,280 | 512 | FullscreenState { fullscreen: true }
)
},
);
let expected_breadcrumb = breadcrumb_for(
&[&outer_session_name, &middle_session_name],
&inner_session_name,
);
nested.outer.wait_until(
"the ascended outer drops its own chrome and shows the full nested fullscreen... |
rust_dataset_chunk_512281 | rust_dataset.txt | 512,281 | 512 | nested.middle.wait_until(
"middle entered pane mode before splitting a sibling",
|middle_grid| {
last_line_contains(middle_grid, "PANE") && last_line_contains(middle_grid, "Move")
},
);
nested.outer.send_stdin(&keys::key('r'));
let middle_sibling = nested.middle.expect_p... |
rust_dataset_chunk_512282 | rust_dataset.txt | 512,282 | 512 | outer_grid.contains(&inner_breadcrumb)
&& !host_own_name_present(outer_grid, &outer_session_name)
&& !host_own_name_present(outer_grid, &middle_session_name)
&& outer_grid.cursor_is_at(col(0).row(1))
},
);
let cancels_after = nested.outer_to_m... |
rust_dataset_chunk_512283 | rust_dataset.txt | 512,283 | 512 | _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);
nested.host.send... |
rust_dataset_chunk_512284 | rust_dataset.txt | 512,284 | 512 | HostFullscreen { fullscreen: true }
)
});
let host_session_name = nested.host.session_name().to_string();
let guest_session_name = nested.guest.session_name().to_string();
let expected_breadcrumb = breadcrumb_for(&[&host_session_name], &guest_session_name);
nested
.host
... |
rust_dataset_chunk_512285 | rust_dataset.txt | 512,285 | 512 | &outer_session_name)
},
);
let bubbled = nested.mark_inner_to_middle();
let outer_told = nested.mark_outer_to_middle();
let middle_told = nested.mark_middle_to_inner();
nested.outer.send_stdin(&keys::ctrl('o'));
nested.inner.wait_until(
"inner entered session mode before the to... |
rust_dataset_chunk_512286 | rust_dataset.txt | 512,286 | 512 | _fullscreen_from_descended_guest(&nested);
let expected_breadcrumb = breadcrumb_for(&[&host_session_name], &guest_session_name);
let fullscreen_grid = nested.host.wait_until(
"guest fullscreened with the breadcrumb visible before clicking",
|host_grid| {
host_grid.lines().first().map... |
rust_dataset_chunk_512287 | rust_dataset.txt | 512,287 | 512 | the breadcrumb click",
|host_grid| {
host_grid.status_bar_appears() && host_own_name_present(host_grid, &host_session_name)
},
);
nested.host.send_stdin(&keys::alt('n'));
let host_new_pane = nested.host.expect_pty_spawn();
host_new_pane.output(b"$ ");
nested.host.wait_u... |
rust_dataset_chunk_512288 | rust_dataset.txt | 512,288 | 512 | },
);
nested.host.wait_until(
"host chrome restored after manually breaking the fullscreen",
|host_grid| {
host_grid.status_bar_appears() && host_own_name_present(host_grid, &host_session_name)
},
);
}
#[test]
fn guest_killed_while_fullscreened_unzooms_the_host_after_li... |
rust_dataset_chunk_512289 | rust_dataset.txt | 512,289 | 512 | |guest_grid| {
guest_grid.lines().first().map_or(false, |first_line| {
first_line.contains(&expected_breadcrumb)
})
},
);
let first_line = fullscreened.lines().into_iter().next().unwrap();
assert!(
!first_line.contains("[NESTED]"),
"th... |
rust_dataset_chunk_512290 | rust_dataset.txt | 512,290 | 512 | rows) != size_before_zoom
});
let guest_terminal = nested.guest.expect_pty_spawn();
guest_terminal.exit(Some(0));
nested.guest.wait_for_main_client_to_exit();
nested.wait_for_host_to_reclaim_focus_after_guest_exit();
nested.host_pane.wait_for_size(
"the guest pane went back to its ... |
rust_dataset_chunk_512291 | rust_dataset.txt | 512,291 | 512 | y" { FocusGuestSession; }
}
}"#
}
fn modal_shortcut_binding_config() -> &'static str {
r#"keybinds {
normal {
bind "Ctrl y" { ToggleHostFullscreen; }
bind "Ctrl u" { FocusHostSession; }
bind "Ctrl i" { FocusGuestSession; }
}
}"#
}
#[test]
fn modal_renders_expected_ui() {
l... |
rust_dataset_chunk_512292 | rust_dataset.txt | 512,292 | 512 | grid_contains_line_starting_with(&second_selection, "> 2."));
assert!(!grid_contains_line_starting_with(&second_selection, "> 1."));
nested.guest.wait_for_app_load();
nested.guest.quit();
nested.host.quit();
}
#[test]
fn modal_appears_on_announce_and_occludes_guest_content() {
let mut nested = Nes... |
rust_dataset_chunk_512293 | rust_dataset.txt | 512,293 | 512 | nested.guest.wait_for_app_load();
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 key after zoom",
|guest_grid| guest_grid.contains("Pane ... |
rust_dataset_chunk_512294 | rust_dataset.txt | 512,294 | 512 | MINAL_SIZE);
let second_with_modal =
second.wait_until("the second client also sees the guest modal", modal_visible);
assert!(modal_visible(&second_with_modal));
let descended = nested.mark_host_to_guest();
nested.host.send_stdin(b"2");
nested.wait_for_host_to_descend_into_guest_after(desce... |
rust_dataset_chunk_512295 | rust_dataset.txt | 512,295 | 512 | ERMINAL_SIZE, "mouse_mode true");
wait_for_modal(&nested);
let host_with_options = nested
.host
.wait_until("the modal options are shown", |host_grid| {
host_grid.contains("When this pane gains focus")
});
let (column, row) = position_of(&host_with_options, "When this pa... |
rust_dataset_chunk_512296 | rust_dataset.txt | 512,296 | 512 | last_line_contains(grid_snapshot, "LOCK")
}
fn pane_mode_bar_settled(grid_snapshot: &GridSnapshot) -> bool {
last_line_contains(grid_snapshot, "Fullscreen")
}
fn session_mode_bar_settled(grid_snapshot: &GridSnapshot) -> bool {
last_line_contains(grid_snapshot, "SESSION")
&& (last_line_contains(grid_s... |
rust_dataset_chunk_512297 | rust_dataset.txt | 512,297 | 512 | ();
nested.descend_into_guest_via_modal();
nested.guest.wait_for_app_load();
nested.wait_for_host_to_ping_guest();
nested.wait_for_guest_to_reply_to_ping();
nested
.guest
.wait_until("guest settled in normal mode", guest_ui_settled);
}
fn ascend_via_focus_host_binding(nested: &Neste... |
rust_dataset_chunk_512298 | rust_dataset.txt | 512,298 | 512 | boot_and_descend_on_first_load(nested);
ascend_via_focus_host_binding(nested);
let sibling = split_host_sibling(nested);
descend_into_guest_on_the_left(nested);
sibling
}
fn quit_guest_then_host(mut nested: NestedHarness) {
nested.guest.quit();
nested.wait_for_host_to_reclaim_focus_after_gu... |
rust_dataset_chunk_512299 | rust_dataset.txt | 512,299 | 512 | staying descended",
|guest_grid| {
guest_grid.row_count() == guest_pane_larger.1 as usize && guest_ui_settled(guest_grid)
},
);
nested.host.send_stdin(&keys::alt('n'));
let guest_new_pane = nested.guest.expect_pty_spawn();
guest_new_pane.output(PROMPT);
nested.guest.wai... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.