2
0
Fork 0
mirror of https://github.com/nushell/nushell synced 2025-01-30 22:03:35 +00:00
nushell/crates/nu-command/tests/commands/inspect.rs
Tilen Gimpelj 60041879f3
throw an error instead of a panic if no input is provided to inspect ()
# Description

This is a small PR to fix Nu crashing when calling `inspect` with no
data piped in().


# User-Facing Changes

none.
2023-05-22 13:54:04 -05:00

7 lines
169 B
Rust

use nu_test_support::nu;
#[test]
fn inspect_with_empty_pipeline() {
let actual = nu!("inspect");
assert!(actual.err.contains("no input value was piped in"));
}