Software /
code /
prosody
File
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 source
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);