mirror of https://github.com/bjc/prosody
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
405 B
14 lines
405 B
local iter = require "util.iterators";
|
|
|
|
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);
|
|
|