mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 12:35:59 +02:00
Rust 1.85, edition=2024 (#15741)
This commit is contained in:
@ -146,8 +146,11 @@ fn get_error_columns() {
|
||||
|
||||
#[test]
|
||||
fn get_json_error() {
|
||||
let actual = nu!("try { non_existent_command } catch {|err| $err} | get json | from json | update labels.span {{start: 0 end: 0}} | to json -r");
|
||||
let actual = nu!(
|
||||
"try { non_existent_command } catch {|err| $err} | get json | from json | update labels.span {{start: 0 end: 0}} | to json -r"
|
||||
);
|
||||
assert_eq!(
|
||||
actual.out, "{\"msg\":\"External command failed\",\"labels\":[{\"text\":\"Command `non_existent_command` not found\",\"span\":{\"start\":0,\"end\":0}}],\"code\":\"nu::shell::external_command\",\"url\":null,\"help\":\"`non_existent_command` is neither a Nushell built-in or a known external command\",\"inner\":[]}"
|
||||
actual.out,
|
||||
"{\"msg\":\"External command failed\",\"labels\":[{\"text\":\"Command `non_existent_command` not found\",\"span\":{\"start\":0,\"end\":0}}],\"code\":\"nu::shell::external_command\",\"url\":null,\"help\":\"`non_existent_command` is neither a Nushell built-in or a known external command\",\"inner\":[]}"
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user