mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 08:06:03 +02:00
change display_error.exit_code to false (#13873)
The idea comes from @amtoine, I think it would be good to keey `display_error.exit_code` same value, if user is using default config or using no config file at all.
This commit is contained in:
@ -9,25 +9,28 @@ fn capture_errors_works() {
|
||||
assert!(actual.err.contains("column_not_found"));
|
||||
}
|
||||
|
||||
// TODO: need to add tests under display_error.exit_code = true
|
||||
#[test]
|
||||
fn capture_errors_works_for_external() {
|
||||
let actual = nu!("do -c {nu --testbin fail}");
|
||||
assert!(actual.err.contains("exited with code"));
|
||||
assert_eq!(actual.out, "");
|
||||
assert!(!actual.status.success());
|
||||
assert!(!actual.err.contains("exited with code"));
|
||||
}
|
||||
|
||||
// TODO: need to add tests under display_error.exit_code = true
|
||||
#[test]
|
||||
fn capture_errors_works_for_external_with_pipeline() {
|
||||
let actual = nu!("do -c {nu --testbin fail} | echo `text`");
|
||||
assert!(actual.err.contains("exited with code"));
|
||||
assert_eq!(actual.out, "");
|
||||
assert!(!actual.status.success());
|
||||
assert!(!actual.err.contains("exited with code"));
|
||||
}
|
||||
|
||||
// TODO: need to add tests under display_error.exit_code = true
|
||||
#[test]
|
||||
fn capture_errors_works_for_external_with_semicolon() {
|
||||
let actual = nu!(r#"do -c {nu --testbin fail}; echo `text`"#);
|
||||
assert!(actual.err.contains("exited with code"));
|
||||
assert_eq!(actual.out, "");
|
||||
assert!(!actual.status.success());
|
||||
assert!(!actual.err.contains("exited with code"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Reference in New Issue
Block a user