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

Test coverage improvements #28

Merged
merged 3 commits into from Jan 10, 2017

Conversation

Projects
None yet
2 participants
@openstrike
Contributor

openstrike commented Oct 28, 2016

In response to issue #26 this PR increases the coverage generally (all perl subs are now covered, even parse()) and also includes a number of tests of strptime for both regression and also TODO tests for these bugs:

  • Fatal parse errors for some format strings
  • Incorrect times resulting from parsing
  • Locale-specific parsing errors (DD/MM vs MM/DD in %x)

There's also one TODO test for what I believe is a bug in that the strftime output with %s (to give epoch time) appears to be timezone dependent.

Note that some of the new tests generate "garbage at end of string in strptime" warnings which might indicate further issues with strptime.

This PR is submitted as part of the CPAN PR Challenge.

openstrike and others added some commits Oct 8, 2016

New tests to improve general coverage
Perl subs now have 100% coverage
More tests of strptime
Include TODO tests for fatal parse error bugs and incorrect parsing

@smith153 smith153 merged commit ff61ad9 into Dual-Life:master Jan 10, 2017

@smith153

This comment has been minimized.

Show comment
Hide comment
@smith153

smith153 Jan 10, 2017

Collaborator

Merged! Thanks for spending time on this :)

Noticed the %s tests with strptime() weren't passing. Looks like it doesn't handle GMT at all, I'll have to fix that.
I will probably move most of the strptime() tests (and any other tricky ones) into an xt/ directory soon and then make sure they only run on demand or when going through cpantesters.

Collaborator

smith153 commented Jan 10, 2017

Merged! Thanks for spending time on this :)

Noticed the %s tests with strptime() weren't passing. Looks like it doesn't handle GMT at all, I'll have to fix that.
I will probably move most of the strptime() tests (and any other tricky ones) into an xt/ directory soon and then make sure they only run on demand or when going through cpantesters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment