Software /
code /
prosody
Diff
spec/util_iterators_spec.lua @ 12802:4a8740e01813
Merge 0.12->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 12 Dec 2022 07:10:54 +0100 |
parent | 12744:e894677359e5 |
line wrap: on
line diff
--- a/spec/util_iterators_spec.lua Mon Dec 12 20:40:23 2022 +0100 +++ b/spec/util_iterators_spec.lua Mon Dec 12 07:10:54 2022 +0100 @@ -10,6 +10,14 @@ end assert.same(output, expect); end); + it("should work with only a single iterator", function () + local expect = { "a", "b", "c" }; + local output = {}; + for x in iter.join(iter.values({"a", "b", "c"})) do + table.insert(output, x); + end + assert.same(output, expect); + end); end); describe("sorted_pairs", function ()