garydgregory commented on code in PR #618:
URL: https://github.com/apache/commons-compress/pull/618#discussion_r1864254886


##########
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:
   @ddeschenes-1 
   In the future, make the parameter a `Charset` instead of a String and you 
won't need the test to do the conversion.



-- 
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]

Reply via email to