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

filter::parse_spec() ignore bogon empty, blank (sub)strings #188

Merged
merged 2 commits into from Dec 7, 2020

Commits on Dec 7, 2020

  1. [1 of 2]: filter (tests): exercise parse_spec() on empty, blank specs

    These unit tests demonstrate filter::parse_spec() accepting as legit
    empty and blank spec strings that it should be ignoring:
    
        $ cargo test 'filter::tests::'
        ...
        failures:
            filter::tests::parse_spec_blank_level_isolated
            filter::tests::parse_spec_blank_level_isolated_blank_comma
            filter::tests::parse_spec_blank_level_isolated_comma_blank
    
        test result: FAILED. 21 passed; 3 failed; 0 ignored; 0 measured; 11 filtered out
    
    Fix to come in follow-up commit.
    salewski committed Dec 7, 2020
    Copy the full SHA
    1205e4d View commit details
    Browse the repository at this point in the history
  2. [2 of 2]: filter::parse_spec() ignore bogon empty, blank substrings

    Fix issue demonstrated by unit tests in commit 2ff2bf1.
    
    While parsing comma-separated substrings, parse_spec() now trims the
    values to ensure empty and blank substrings (which are invalid) are
    ignored.
    
    Previously, only-comma-separated empty substrings were being
    ignored. This change extends that intent to also ignore the empty
    string (no comma), stand-alone blank strings (no comma), and comma-
    separated variations of empty and/or blank substrings.
    salewski committed Dec 7, 2020
    Copy the full SHA
    780e7c5 View commit details
    Browse the repository at this point in the history