Properly evaluate dynamic blocks (#3339)

This commit is contained in:
JT
2021-04-21 14:31:54 +12:00
committed by GitHub
parent ce35689d2e
commit 02d5729941
2 changed files with 32 additions and 37 deletions

View File

@ -391,6 +391,17 @@ fn proper_shadow_set_aliases() {
assert_eq!(actual.out, "falsetruefalse");
}
#[test]
fn run_dynamic_blocks() {
let actual = nu!(
cwd: ".",
r#"
let block = { echo "holaaaa" }; $block
"#
);
assert_eq!(actual.out, "holaaaa");
}
#[cfg(feature = "which")]
#[test]
fn argument_invocation_reports_errors() {