-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix regex matching for readInfo #25
Fix regex matching for readInfo #25
Conversation
Codecov Report
@@ Coverage Diff @@
## master #25 +/- ##
============================================
+ Coverage 87.43% 87.82% +0.39%
- Complexity 142 143 +1
============================================
Files 16 16
Lines 573 575 +2
Branches 82 82
============================================
+ Hits 501 505 +4
+ Misses 42 41 -1
+ Partials 30 29 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a case where a small unit test would help verify the updated functionality.
The following addition to "ProfileValidationUtilTest.java" may do the trick:
@Test
public void testOnDiskInfoValidation() throws ProfileValidationException, IOException {
rules.clear();
rules.put("Source-Organization",
new ProfileFieldRule(required, repeatable, recommended, "", singleton("bagit-support")));
rules.put("Organization-Address",
new ProfileFieldRule(required, repeatable, recommended, "", singleton("localhost-dot-localdomain")));
final String bagInfoPath = "src/test/resources/sample/bag/bag-info.txt";
ProfileValidationUtil.validate("profile-section", rules, Paths.get(bagInfoPath));
}
Your last commit seems to revert your second. |
Resolves #16
Use
find
instead ofmatch
to test if a line is an extended tag value