Software /
code /
prosody
Diff
spec/util_iterators_spec.lua @ 8802:befffddf1b25
Fix wrong tests committed with 7b621a4a2e8d
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 18 May 2018 15:20:32 +0100 |
child | 8805:82d68951ec2a |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/spec/util_iterators_spec.lua Fri May 18 15:20:32 2018 +0100 @@ -0,0 +1,15 @@ +local iter = require "util.iterators"; +local set = require "util.set"; + +describe("util.iterators", function () + describe("join", function () + it("should produce a joined iterator", function () + local expect = { "a", "b", "c", 1, 2, 3 }; + local output = {}; + for x in iter.join(iter.values({"a", "b", "c"})):append(iter.values({1, 2, 3})) do + table.insert(output, x); + end + assert.same(output, expect); + end); + end); +end);