Skip to content

Commit a1cf4f2

Browse files
committed
Refactor delimiter in test
Rename local variable
1 parent 871f745 commit a1cf4f2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/test/java/org/apache/commons/csv/CSVParserTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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\ncx😀d\n";
675+
final String data = "a" + delimiter + "b\nc" + 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

0 commit comments

Comments
 (0)