luacov icon indicating copy to clipboard operation
luacov copied to clipboard

Incorrect output of LuaCov

Open siffiejoe opened this issue 10 years ago • 0 comments

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

siffiejoe avatar Feb 10 '14 07:02 siffiejoe