test: add unit tests for ParseExtToSlice and ParseExcludeToSlice - #300
Merged
pashkov256 merged 3 commits intoMar 17, 2026
Merged
Conversation
added 2 commits
March 16, 2026 03:20
Add unit tests for the path package constants to verify they are non-empty and match expected values: - AppDirName should be 'deletor' - RuleFileName should be 'rule.json' - LogFileName should be 'deletor.log' This is a good first issue to learn the project layout and run tests. Closes pashkov256#285
Add table-driven unit tests for the parse functions: - ParseExtToSlice: tests for empty string, extensions with/without dot, uppercase/lowercase, spaces handling - ParseExcludeToSlice: tests for empty string, single/multiple patterns, spaces handling, empty entries Closes pashkov256#279
Contributor
Author
|
I closed the narrower earlier test PR and kept this one open since it covers the same area plus the ParseExtToSlice / ParseExcludeToSlice cases in a single change. |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Owner
|
Hi @Yuki9814. Great solution, thanks for contributing to the repository. Would it be difficult for you to put a star on the repository for promotion? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add table-driven unit tests for the parse functions in internal/utils:
Changes
Related Issue
Closes #279