uutils / util-linux

Rust reimplementation of the util-linux project
MIT License
17 stars 10 forks source link

rev: add some tests #73

Closed cakebaker closed 3 months ago

cakebaker commented 3 months ago

This PR adds some tests, adapts an error message and replaces a match with let/else.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 97.05882% with 1 line in your changes missing coverage. Please review.

Project coverage is 47.42%. Comparing base (5091640) to head (04ccbe3). Report is 19 commits behind head on main.

Files Patch % Lines
src/uu/rev/src/rev.rs 75.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #73 +/- ## ========================================== + Coverage 42.10% 47.42% +5.31% ========================================== Files 14 14 Lines 1565 1611 +46 Branches 201 205 +4 ========================================== + Hits 659 764 +105 + Misses 879 814 -65 - Partials 27 33 +6 ``` | [Flag](https://app.codecov.io/gh/uutils/util-linux/pull/73/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uutils) | Coverage Δ | | |---|---|---| | [macos_latest](https://app.codecov.io/gh/uutils/util-linux/pull/73/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uutils) | `47.74% <97.05%> (+5.67%)` | :arrow_up: | | [ubuntu_latest](https://app.codecov.io/gh/uutils/util-linux/pull/73/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uutils) | `43.39% <97.05%> (+5.31%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uutils#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.