diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-05-18 15:20:32 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-05-18 15:20:32 +0100 |
commit | d75ceb7e996ccd2fbe4e0c30ec75d17d327044ee (patch) | |
tree | 6161334b25afbbe0d76fcec605589655d995f501 /spec/util_iterators_spec.lua | |
parent | c9034dfeadbe979c3a7ba9ad7bd5f78907383687 (diff) | |
download | prosody-d75ceb7e996ccd2fbe4e0c30ec75d17d327044ee.tar.gz prosody-d75ceb7e996ccd2fbe4e0c30ec75d17d327044ee.zip |
Fix wrong tests committed with 7b621a4a2e8d
Diffstat (limited to 'spec/util_iterators_spec.lua')
-rw-r--r-- | spec/util_iterators_spec.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/util_iterators_spec.lua b/spec/util_iterators_spec.lua new file mode 100644 index 00000000..63835b12 --- /dev/null +++ b/spec/util_iterators_spec.lua @@ -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); |