mirror of
https://github.com/nushell/nushell
synced 2025-01-19 00:24:10 +00:00
a217bc0715
* Fix6223 * clippy fix Co-authored-by: Frank <v-frankz@microsoft.com>
31 lines
500 B
Rust
31 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"));
|
|
}
|