ddeschenes-1 commented on code in PR #618:
URL: https://github.com/apache/commons-compress/pull/618#discussion_r1864260203
##########
src/test/java/org/apache/commons/compress/compressors/gzip/GzipParametersTest.java:
##########
@@ -46,4 +50,44 @@ public void testToString() {
gzipParameters.setOS(GzipParameters.OS.Z_SYSTEM);
assertTrue(gzipParameters.toString().contains("Z_SYSTEM"));
}
+
+ @ParameterizedTest
+ //@formatter:off
+ @CsvSource({
+ " , helloworld",
+ " , helloéworld",
+ "ISO-8859-1, helloworld",
+ "ISO-8859-1, helloéworld",
+ "UTF-8 , helloworld",
+ "UTF-8 , helloéworld"
+ })
+ //@formatter:on
+ public void testLegalCommentOrFileName(final String charset, final String
text) {
+ final GzipParameters p = new GzipParameters();
+ if (charset != null) {
+ p.setFileNameCharset(Charset.forName(charset));
Review Comment:
There is no automatic converter from String to Charset in junit5.
Adding the necessary lines for a @ConvertWith converter class would be far
more code than those 2 lines.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]