tests/pass/op_close.lua

Mon, 22 Nov 2010 04:56:38 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Mon, 22 Nov 2010 04:56:38 +0000
changeset 126
07ec490c7a6f
permissions
-rw-r--r--

Add a whole bunch of tests I've been using for recent additions

local f = {};
for i=1,2 do
	local p;
	f[i] = function (set)
		if set then
			p = set;
		end
		return p;
	end;
end

assert(f[1]("foo") == "foo");
assert(f[2]("bar") == "bar");
assert(f[1]() == "foo");
assert(f[2]() == "bar");

mercurial