Skip to content

Commit 5ffbdee

Browse files
committed
- F further improve DateScrubber help message
1 parent 6140cd8 commit 5ffbdee

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

approvaltests-tests/src/test/java/org/approvaltests/scrubbers/DateScrubberTest.testDateFormatNotFoundMessage.approved.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
com.spun.util.FormattedException: No match found for this format does not exist.
2-
Feel free to add your date at https://github.com/approvals/ApprovalTests.Java/issues/112
1+
com.spun.util.FormattedException: No match found for "this format does not exist".
2+
3+
Feel free to add your date at https://github.com/approvals/ApprovalTests.Java/issues/112.
4+
35
Current supported formats are:
46
[a-zA-Z]{3} [a-zA-Z]{3} \d{2} \d{2}:\d{2}:\d{2}
57
[a-zA-Z]{3} [a-zA-Z]{3} \d{2} \d{2}:\d{2}:\d{2} [a-zA-Z]{3,4} \d{4}

approvaltests/src/main/java/org/approvaltests/scrubbers/DateScrubber.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public static DateScrubber getScrubberFor(String formattedExample)
9393
{ return scrubber; }
9494
}
9595
throw new FormattedException(
96-
"No match found for %s.\nFeel free to add your date at https://github.com/approvals/ApprovalTests.Java/issues/112 \nCurrent supported formats are: \n\t%s",
96+
"No match found for \"%s\".\n\nFeel free to add your date at https://github.com/approvals/ApprovalTests.Java/issues/112.\n\nCurrent supported formats are: \n\t%s",
9797
formattedExample, Query.select(getSupportedFormats(), SupportedFormat::getRegex).join("\n\t"));
9898
}
9999

0 commit comments

Comments
 (0)