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

Fixed: Dasherize tests #7

Merged
merged 2 commits into from
Sep 4, 2023

Conversation

ahankinson
Copy link
Contributor

@ahankinson ahankinson commented Sep 4, 2023

This PR fixes the tests for the String Extra dasherize function.

  • It removes the uppercase text test in the dasherize function. The dasherize function was previously modified to not put the leading dash in the case of a capital letter starting the string, so this test is no longer needed. Any other cases are covered by existing tests.

  • It fixes the test that checks for whitespace and consecutive dashes in the resulting string. The previous test tried to do these both together and failed on bad fuzz input. This corrects the test input processing and separates each test into its own function.

This PR removes the uppercase text test.

The dasherize function was previously modified to not put the leading dash in the case of a capital letter starting the string, so this test is no longer needed. Any other cases are covered by existing tests.
@ahankinson
Copy link
Contributor Author

c.f., elm-community/string-extra#57

@ahankinson ahankinson changed the title Fixed: Remove uppercase test WIP: Fixed: Remove uppercase test Sep 4, 2023
@ahankinson ahankinson changed the title WIP: Fixed: Remove uppercase test WIP: Remove uppercase test Sep 4, 2023
Breaks dasherize tests out into two separate ones. One checks that there is no whitespace in the resulting string. The second checks that there are no consecutive dashes in the resulting string.

This replaces a previous test that was failing on bad input.
@ahankinson ahankinson changed the title WIP: Remove uppercase test Fixed: Dasherize tests Sep 4, 2023
Copy link
Collaborator

@gampleman gampleman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@gampleman gampleman merged commit 51d5d04 into elmcraft:master Sep 4, 2023
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.

2 participants