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

Bugfix: edge cases for is_type() #7

Merged
merged 3 commits into from Jan 10, 2015

Conversation

Projects
None yet
2 participants
@veryrusty
Contributor

veryrusty commented Jan 9, 2015

Resolves issues reported in RT:66513 for is_type():

  • no warnings generated when media type is NOT of the form type/subtype
  • verify that is_type returns false for an empty string.

veryrusty added some commits Jan 7, 2015

Tests for issues in RT:66513
If the string to is_type(...) is not of the form "type/subtype",
check the return is false and no warnings are generated.

Adds Test::NoWarnings as a test dependency.

Verify behaviour for is_ext and is_type for empty strings.
Shh warnings when no subtype given to is_type(...)
When no subtype was found in the provided media type, a warning
regarding the use of uninitialized value in hash element
was generated.

In this case we immediately return false. Ref RT:66513
Check spec is defined to shhh warnings on perl 5.10
Its only perl 5.12+ that "length undef" returns undef.. D'Oh.
@veryrusty

This comment has been minimized.

Show comment
Hide comment
@veryrusty

veryrusty Jan 9, 2015

Contributor

Sorry for the three attempts.. still waiting for perlbrew to install 5.10.1!

Contributor

veryrusty commented Jan 9, 2015

Sorry for the three attempts.. still waiting for perlbrew to install 5.10.1!

robrwo added a commit that referenced this pull request Jan 10, 2015

Merge pull request #7 from veryrusty/bugfix/is_type
Bugfix: edge cases for is_type() fixes RT:66513

@robrwo robrwo merged commit 5713bbf into robrwo:devel Jan 10, 2015

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment