mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 15:11:52 +02:00
Testing support tweaks: exit status in Outcome
(#10692)
This PR makes a couple of tweaks to the testing support crate: Add the `nu` invocation's exit status to the test output so that one can assert that nu exited with a successful code. This PR was split off of #10232.
This commit is contained in:
@ -279,7 +279,7 @@ pub fn nu_run_test(opts: NuOpts, commands: impl AsRef<str>, with_std: bool) -> O
|
||||
|
||||
println!("=== stderr\n{}", err);
|
||||
|
||||
Outcome::new(out, err.into_owned())
|
||||
Outcome::new(out, err.into_owned(), output.status)
|
||||
}
|
||||
|
||||
pub fn nu_with_plugin_run_test(cwd: impl AsRef<Path>, plugins: &[&str], command: &str) -> Outcome {
|
||||
@ -339,7 +339,7 @@ pub fn nu_with_plugin_run_test(cwd: impl AsRef<Path>, plugins: &[&str], command:
|
||||
|
||||
println!("=== stderr\n{}", err);
|
||||
|
||||
Outcome::new(out, err.into_owned())
|
||||
Outcome::new(out, err.into_owned(), output.status)
|
||||
}
|
||||
|
||||
fn escape_quote_string(input: String) -> String {
|
||||
|
Reference in New Issue
Block a user