#![cfg(target_family = "unix")]
mod support;
use support::pty::{PtySession, PtyShell};
use support::subprocess::{runex_bin_str, shell_available, write_simple_config};
#[test]
fn space_triggers_expand_for_known_token() {
if !shell_available("nu") {
eprintln!("skipping: nu not available");
return;
}
let config = write_simple_config("gcm", "echo EXPANDED");
let Some(mut session) = PtySession::spawn(PtyShell::Nu, runex_bin_str(), config.path()) else {
eprintln!("skipping: could not spawn nu session");
return;
};
session.send("gcm ");
session.send_line("");
session
.expect_regex(r"EXPANDED")
.expect("nu should have echoed EXPANDED after the gcm<Space> expansion");
}