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:
Skyler Hawthorne
2023-11-15 17:50:43 -05:00
committed by GitHub
parent 2b5f1ee5b3
commit a806717f35
2 changed files with 7 additions and 4 deletions

View File

@ -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 {