lunarmodules / luacov

LuaCov is a simple coverage analyzer for Lua code.
http://lunarmodules.github.io/luacov/
MIT License
300 stars 68 forks source link

How to use luacov on Windows #75

Open zhengyanan1 opened 5 years ago

zhengyanan1 commented 5 years ago
package.path = package.path .. ';E:\\hardenzheng\\projects\\luacov\\src\\?.lua';
require("luacov")

if 10 > 100 then
    print("this line will not run")
else
    print("Hello, LuaCov")
end

Here is my code. I am trying to use luacov under Windows. First, I input ''lua test.lua" in the command line under the path of the above file, it works. I can find a file named "luacov.stats.out". Next, I input "lua luacov", It doesn't work and tips "lua: cannot open luacov: No such file or directory"

hishamhm commented 5 years ago

Next, I input "lua luacov",

You can try the full path where the luacov main script is:

lua c:\.....\luacov