Improve keyword parsing, including for (#747)

* Improve keyword parsing, including for

* touchup
This commit is contained in:
JT
2022-01-15 10:26:52 -05:00
committed by GitHub
parent 21a7278259
commit f9c0d223c1
5 changed files with 80 additions and 29 deletions

View File

@@ -143,3 +143,8 @@ fn proper_variable_captures_with_nesting() -> TestResult {
"102",
)
}
#[test]
fn proper_variable_for() -> TestResult {
run_test(r#"for x in 1..3 { if $x == 2 { "bob" } } | get 1"#, "bob")
}

View File

@@ -116,7 +116,7 @@ fn long_flag() -> TestResult {
#[test]
fn let_not_statement() -> TestResult {
fail_test(r#"let x = "hello" | str length"#, "can't")
fail_test(r#"let x = "hello" | str length"#, "used in pipeline")
}
#[test]