File

spec/util_table_spec.lua @ 12204:7c397a49d163

net.resolvers.chain: A resolver for combining other resolvers Say if you wanted to try both _xmpp and _xmpps services
author Kim Alvefur <zash@zash.se>
date Fri, 21 Jan 2022 17:56:20 +0100
parent 9727:9a35ae935390
child 12404:082f38e9de64
line wrap: on
line source

local u_table = require "util.table";
describe("util.table", function ()
	describe("create()", function ()
		it("works", function ()
			-- Can't test the allocated sizes of the table, so what you gonna do?
			assert.is.table(u_table.create(1,1));
		end);
	end);

	describe("pack()", function ()
		it("works", function ()
			assert.same({ "lorem", "ipsum", "dolor", "sit", "amet", n = 5 }, u_table.pack("lorem", "ipsum", "dolor", "sit", "amet"));
		end);
	end);
end);