mirror of
https://github.com/nushell/nushell.git
synced 2024-12-14 03:02:05 +01:00
27 lines
513 B
Rust
27 lines
513 B
Rust
|
use nu_test_support::{nu, pipeline};
|
||
|
|
||
|
#[test]
|
||
|
fn error_label_works() {
|
||
|
let actual = nu!(
|
||
|
cwd: ".", pipeline(
|
||
|
r#"
|
||
|
error make {msg:foo label:{text:unseen}}
|
||
|
"#
|
||
|
));
|
||
|
|
||
|
assert!(actual.err.contains("unseen"));
|
||
|
assert!(actual.err.contains("╰──"));
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn no_span_if_unspanned() {
|
||
|
let actual = nu!(
|
||
|
cwd: ".", pipeline(
|
||
|
r#"
|
||
|
error make -u {msg:foo label:{text:unseen}}
|
||
|
"#
|
||
|
));
|
||
|
|
||
|
assert!(!actual.err.contains("unseen"));
|
||
|
}
|