mirror of
https://github.com/nushell/nushell
synced 2025-01-03 16:58:58 +00:00
32 lines
500 B
Rust
32 lines
500 B
Rust
|
use nu_test_support::{nu, pipeline};
|
||
|
|
||
|
#[test]
|
||
|
fn list_shells() {
|
||
|
let actual = nu!(
|
||
|
cwd: ".", pipeline(
|
||
|
r#"g | get path | length "#
|
||
|
));
|
||
|
|
||
|
assert_eq!(actual.out, "1");
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn enter_shell() {
|
||
|
let actual = nu!(
|
||
|
cwd: ".", pipeline(
|
||
|
r#"g 0"#
|
||
|
));
|
||
|
|
||
|
assert!(actual.err.is_empty());
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn enter_not_exist_shell() {
|
||
|
let actual = nu!(
|
||
|
cwd: ".", pipeline(
|
||
|
r#"g 1"#
|
||
|
));
|
||
|
|
||
|
assert!(actual.err.contains("Not found"));
|
||
|
}
|