I encountered a couple of problems when running luacov in a Linux and Windows mixed environment:
stats files generated on Windows contain CRs that end appended to filenames generating warnings and errors when loading the stats file;
stats files sometimes contain the same file name more than once, some times as a/b/c, other times as ./a/b/c causing an incorrect calculation of the coverage.
This PR addresses those two problems with the following changes:
trailing space is stripped from file names when loading the stats file;
real_name strips the ./ prefix from the input file name.
I encountered a couple of problems when running
luacov
in a Linux and Windows mixed environment:a/b/c
, other times as./a/b/c
causing an incorrect calculation of the coverage.This PR addresses those two problems with the following changes:
real_name
strips the./
prefix from the input file name.