hslua-module-zip: fix tests
Do not create a new file on each run.
@@ -19,16 +19,18 @@ return {
test('archive with file', function ()
system.with_tmpdir('archive', function (tmpdir)
+ system.with_wd(tmpdir, function ()
local filename = 'greetings.txt'
local fh = io.open(filename, 'w')
fh:write('Hi Mom!\n')
fh:close()
assert.are_equal(
- type(zip.create(tmpdir .. '/' .. filename)),
+ type(zip.create{filename}),
'userdata'
)
end)
end)
+ end)
},
group 'extract' {
