luacov
luacov copied to clipboard
Incorrect output of LuaCov
I have found two other quirks:
local function all( p )
*0 return function( ... ) -- FIXME: never executed?
4 for i = 1, select( '#', ... ) do
3 if not p( (select( i, ... )) ) then
1 return false
end
end
1 return true
end
end
local function even( a )
3 return a % 2 == 0
end
1 local all_even = all( even )
1 print( all_even( 2, 4, 5 ) )
2 print( pcall( function() -- FIXME: executed more than once?
1 all_even()
3 end ) ) -- FIXME: executed more than once?
Lua 5.2.3, luacov 0.5-1