mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 06:30:08 +02:00
Errors when let in
, let env
and similar commands are passed. (#5866)
* throw `let nu/env/nothing/in` error in parsing * add tests and fmt * fix clippy * suggestions * fmt * `lvalue.span` instead of `spans[1]` * clippy * fmt
This commit is contained in:
15
crates/nu-command/tests/commands/let_.rs
Normal file
15
crates/nu-command/tests/commands/let_.rs
Normal file
@ -0,0 +1,15 @@
|
||||
use nu_test_support::{nu, pipeline};
|
||||
|
||||
#[test]
|
||||
fn let_parse_error() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
let in = 3
|
||||
"#
|
||||
));
|
||||
|
||||
assert!(actual
|
||||
.err
|
||||
.contains("'in' is the name of a builtin Nushell variable"));
|
||||
}
|
@ -30,6 +30,7 @@ mod into_filesize;
|
||||
mod into_int;
|
||||
mod last;
|
||||
mod length;
|
||||
mod let_;
|
||||
mod lines;
|
||||
mod ls;
|
||||
mod math;
|
||||
|
Reference in New Issue
Block a user