mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 02:45:08 +02:00
Bubble up errors passed to complete
(#11313)
Errors passed in `PipelineData::Value` get thrown in `complete` now. Also added two simple tests for the command. Fix #11187 Fix #10204
This commit is contained in:
17
crates/nu-command/tests/commands/complete.rs
Normal file
17
crates/nu-command/tests/commands/complete.rs
Normal file
@ -0,0 +1,17 @@
|
||||
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"));
|
||||
}
|
Reference in New Issue
Block a user