diff options
Diffstat (limited to 'spec/inputs/test/comprehension_spec.yue')
| -rw-r--r-- | spec/inputs/test/comprehension_spec.yue | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/inputs/test/comprehension_spec.yue b/spec/inputs/test/comprehension_spec.yue new file mode 100644 index 0000000..5f24aba --- /dev/null +++ b/spec/inputs/test/comprehension_spec.yue | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | describe "comprehension", -> | ||
| 2 | it "nested with filter", -> | ||
| 3 | list = {1, 2, 3} | ||
| 4 | out = ["#{i}-#{j}" for i in *list when i % 2 == 1 for j in *list when j > i] | ||
| 5 | assert.same out, {"1-2", "1-3"} | ||
