Diff

spec/util_array_spec.lua @ 13247:1bb4aa803b32 0.12

util.array: Fix new() library function Backport of ffe4adbd2af9 since new was added in the 0.12 branch
author Kim Alvefur <zash@zash.se>
date Sat, 22 Jul 2023 16:31:05 +0200
parent 11787:3ae6fa901a8b
line wrap: on
line diff
--- a/spec/util_array_spec.lua	Mon Jul 17 14:56:57 2023 +0200
+++ b/spec/util_array_spec.lua	Sat Jul 22 16:31:05 2023 +0200
@@ -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"});