hamcrest / JavaHamcrest

Java (and original) version of Hamcrest
http://hamcrest.org/
BSD 3-Clause "New" or "Revised" License
2.11k stars 378 forks source link

enhancement on issue #196 #341

Open Harlan1997 opened 3 years ago

Harlan1997 commented 3 years ago

To specifying the demand of issue #196. I did research on types of whitespace and I pick some most common whitespace: space, tab, line feed, form feed, carriagereturn. Then I modified equalToCompressingWhiteSpace by adding a property whiteSpaceType which is a enum type variable with 6 types of whitespace: space, tab, line feed, form feed, carriagereturn, mix(mix types above). From this, I modify the constructor. To change the match rule, I modified stripSpaces to strip string according to different types of whitespace. To prevent conflicts, I added 6 types of matcher generators, public static Matcher<String> equalToCompressingSPACE(String expectedString) as an example.

nhojpatrick commented 2 years ago

Going to try and kick start hamcrest, so if you want to get it merged, please rebase from the branch v2.3-candidates. Still trying to understand how has permissions to perform a release.