diff options
author | Kim Alvefur <zash@zash.se> | 2023-07-22 16:31:05 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-07-22 16:31:05 +0200 |
commit | 0fa9d6be37147d8815e7877d1cb63842518c1416 (patch) | |
tree | 6ec4bcfd8e1ea388cd9609ef11922f2899be22c8 /spec | |
parent | 683b90f87125b405b16bfe3e4654e024fc70345a (diff) | |
download | prosody-0fa9d6be37147d8815e7877d1cb63842518c1416.tar.gz prosody-0fa9d6be37147d8815e7877d1cb63842518c1416.zip |
util.array: Fix new() library function
Backport of ffe4adbd2af9 since new was added in the 0.12 branch
Diffstat (limited to 'spec')
-rw-r--r-- | spec/util_array_spec.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/util_array_spec.lua b/spec/util_array_spec.lua index ff049d0e..60c24753 100644 --- a/spec/util_array_spec.lua +++ b/spec/util_array_spec.lua @@ -1,6 +1,13 @@ local array = require "util.array"; describe("util.array", function () describe("creation", function () + describe("new", function () + it("works", function () + local a = array.new({"a", "b", "c"}); + assert.same({"a", "b", "c"}, a); + end); + end); + describe("from table", function () it("works", function () local a = array({"a", "b", "c"}); |