add a test and update TODO

This commit is contained in:
JT 2021-09-07 19:09:49 +12:00
parent b0ab78a767
commit 6af3affee2
2 changed files with 9 additions and 1 deletions

View File

@ -16,7 +16,7 @@
- [x] Ranges
- [x] Column path
- [x] ...rest without calling it rest
- [ ] Iteration (`each`) over tables
- [x] Iteration (`each`) over tables
- [ ] ctrl-c support
- [ ] operator overflow
- [ ] finish operator type-checking

View File

@ -279,3 +279,11 @@ fn cell_path_var2() -> TestResult {
fn custom_rest_var() -> TestResult {
run_test("def foo [...x] { $x.0 + $x.1 }; foo 10 80", "90")
}
#[test]
fn row_iteration() -> TestResult {
run_test(
"[[name, size]; [tj, 100], [rl, 200]] | each { $it.size * 8 }",
"[800, 1600]",
)
}