mirror of
https://github.com/nushell/nushell
synced 2024-12-30 23:08:56 +00:00
020e121391
Errors passed in `PipelineData::Value` get thrown in `complete` now. Also added two simple tests for the command. Fix #11187 Fix #10204
17 lines
322 B
Rust
17 lines
322 B
Rust
use nu_test_support::nu;
|
|
|
|
#[test]
|
|
fn basic() {
|
|
let actual = nu!(r#"
|
|
(^echo a | complete) == {stdout: "a\n", exit_code: 0}
|
|
"#);
|
|
|
|
assert_eq!(actual.out, "true");
|
|
}
|
|
|
|
#[test]
|
|
fn error() {
|
|
let actual = nu!("do { not-found } | complete");
|
|
|
|
assert!(actual.err.contains("executable was not found"));
|
|
}
|