Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit tests for perl.prov #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

perlpunk
Copy link
Collaborator

@perlpunk perlpunk commented Feb 14, 2025

This adds unit tests to achieve 100% coverage for perl.prov.

I didn't want to introduce any changes in perl.prov at this point so
I added some todos:

  • The code doesn't work on perl 5.8 anymore because it doesn't have version.pm.
    I think it can be fixed by moving the version->parse thing into the branch
    where the actual commandline option is used. Not sure which old perl
    versions we have to support, but 5.8 should be easy to support, and
    it might be possible someone would want to run the latest rpm on a machine
    with perl 5.8
  • Bare <<EOM tags are not supported yet
  • Versions with a single digit aren't supported (\d+[._0-9]+)

It runs the unit tests on all perl versions, and runs the coverage in an extra job and checks for 100%.
I had to mark one line as uncoverable.

@perlpunk perlpunk force-pushed the unit-tests branch 3 times, most recently from 6318ede to 809c831 Compare February 18, 2025 17:03
This adds unit tests to achieve 100% coverage for perl.prov.

I didn't want to introduce any changes in perl.prov at this point so
I added some todos:
* The code doesn't work on perl 5.8 anymore because it doesn't have version.pm.
  I think it can be fixed by moving the version->parse thing into the branch
  where the actual commandline option is used. Not sure which old perl
  versions we have to support, but 5.8 should be easy to support, and
  it might be possible someone would want to run the latest rpm on a machine
  with perl 5.8
* Bare <<EOM tags are not supported yet
* Versions with a single digit aren't supported (`\d+[._0-9]+`)
@perlpunk perlpunk marked this pull request as ready for review February 19, 2025 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant