mesalock-linux / mesabox

A collection of core system utilities written in Rust for Unix-like systems (and now Windows)
BSD 3-Clause "New" or "Revised" License
137 stars 19 forks source link

posix/test/echo: add tests to cover more lines #30

Closed mssun closed 6 years ago

mssun commented 6 years ago

Try to cover all lines (except potential errors).

codecov[bot] commented 6 years ago

Codecov Report

Merging #30 into master will increase coverage by 0.06%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #30      +/-   ##
==========================================
+ Coverage   19.75%   19.81%   +0.06%     
==========================================
  Files          26       26              
  Lines        3305     3305              
  Branches      754      754              
==========================================
+ Hits          653      655       +2     
+ Misses       2442     2437       -5     
- Partials      210      213       +3
Impacted Files Coverage Δ
src/posix/echo/mod.rs 48.57% <0%> (+5.71%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 065d3c3...3339a33. Read the comment docs.

mssun commented 6 years ago

Only +2 hits and +3 partials. Sad...

I have to find ways to test errors cases.

Arcterus commented 6 years ago

The reported coverage for this is really sketchy. It’s seemingly randomly skipping lines.

mssun commented 6 years ago

Let me find out why some projects can hit 90%+ coverage.