lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

在 2016/5/11 8:48, Dan Christian 写道:
I had things running with luaunit 1.5, which imports as globals.
But then I needed the luarocks version which is 2.1 and everything is
There is a 3.1 out there, but it isn't packaged with luarocks.

I tried importing it like this (from the example in the source)

local LuaUnit = require('luaunit')

Tests = {}

function Tests:test1()
   LuaUnit.assertEquals(foo, bar)


But LuaUnit.assertEquals is nil.

I'm not sure how this is supposed to be used.


Have not used luaunit. if you don't have special requirement for luaunit, I'd suggest you try busted.

it is at

the nerdy Peng / 书呆彭 / Sent from Thunderbird