Software /
code /
prosody
File
spec/util_iterators_spec.lua @ 8803:60e113f3682f
mod_limits: Rename variable to avoid name clash [luacheck]
FIXME better name, s_throttle doesn't seem nice
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 02 May 2018 13:58:28 +0200 |
parent | 8802:befffddf1b25 |
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);