mirror of
https://github.com/nushell/nushell
synced 2024-12-30 15:03:25 +00:00
a0db4ce747
* adds `capture-errors` flag for `do` * adds `get-type` core command to get type * fmt * add tests in example * fmt * fix tests * manually revert previous changes related to `get-type` * adds method to check for error name using `into string` * fix clippy
13 lines
231 B
Rust
13 lines
231 B
Rust
use nu_test_support::{nu, pipeline};
|
|
|
|
#[test]
|
|
fn capture_errors_works() {
|
|
let actual = nu!(
|
|
cwd: ".", pipeline(
|
|
r#"
|
|
do -c {$env.use} | describe
|
|
"#
|
|
));
|
|
|
|
assert_eq!(actual.out, "error");
|
|
}
|