File tree Expand file tree Collapse file tree
src/test/java/org/apache/commons/csv Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -672,10 +672,10 @@ void testGetBytePositionMultiCharacterDelimiter() throws IOException {
672672 @ Test
673673 void testGetBytePositionMultiCharacterDelimiterWithSupplementaryCharacter () throws IOException {
674674 final String delimiter = "x😀" ;
675- final String code = "ax😀b \n cx😀 d\n " ;
675+ final String data = "a" + delimiter + "b \n c" + delimiter + " d\n " ;
676676 final CSVFormat format = CSVFormat .DEFAULT .builder ().setDelimiter (delimiter ).get ();
677677 try (CSVParser parser = CSVParser .builder ()
678- .setReader (new StringReader (code ))
678+ .setReader (new StringReader (data ))
679679 .setFormat (format )
680680 .setCharset (UTF_8 )
681681 .setTrackBytes (true )
@@ -687,7 +687,7 @@ void testGetBytePositionMultiCharacterDelimiterWithSupplementaryCharacter() thro
687687 assertValuesEquals (new String [] { "a" , "b" }, first );
688688 assertValuesEquals (new String [] { "c" , "d" }, second );
689689 assertEquals (0 , first .getBytePosition ());
690- assertEquals ("ax😀 b\n " .getBytes (UTF_8 ).length , second .getBytePosition ());
690+ assertEquals ("a" + delimiter + " b\n " .getBytes (UTF_8 ).length , second .getBytePosition ());
691691 }
692692 }
693693
You can’t perform that action at this time.
0 commit comments