Convert 'for' to a statement (#7086)

This commit is contained in:
JT
2022-11-11 09:05:34 +13:00
committed by GitHub
parent f1118020a1
commit 18d7e64660
5 changed files with 77 additions and 114 deletions

View File

@ -83,6 +83,18 @@ fn argument_subexpression() {
assert_eq!(actual.out, "foo");
}
#[test]
fn for_loop() {
let actual = nu!(
cwd: ".",
r#"
for i in 1..3 { print $i }
"#
);
assert_eq!(actual.out, "123");
}
#[test]
fn subexpression_handles_dot() {
Playground::setup("subexpression_handles_dot", |dirs, sandbox| {