From aa6bff833b4b9900db7601b08daf68b860a9a9fe Mon Sep 17 00:00:00 2001 From: Devyn Cairns Date: Sun, 21 Jul 2024 04:09:59 -0700 Subject: [PATCH] add test for let with declared type (thx @amtoine) --- crates/nu-command/tests/commands/let_.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/nu-command/tests/commands/let_.rs b/crates/nu-command/tests/commands/let_.rs index 4bedf31104..7e0273ebd8 100644 --- a/crates/nu-command/tests/commands/let_.rs +++ b/crates/nu-command/tests/commands/let_.rs @@ -23,6 +23,13 @@ fn let_takes_pipeline() { assert_eq!(actual.out, "11"); } +#[test] +fn let_takes_pipeline_with_declared_type() { + let actual = nu!(r#"let x: list = [] | append "hello world"; print $x.0"#); + + assert_eq!(actual.out, "hello world"); +} + #[test] fn let_pipeline_allows_in() { let actual =