@@ -1182,7 +1182,7 @@ public void testWithSystemRecordSeparator() {
11821182 public void testPrintWithEscapesEndWithCRLF () throws IOException {
11831183 final Reader in = new StringReader ("x,y,x\r \n a,?b,c\r \n " );
11841184 final Appendable out = new StringBuilder ();
1185- CSVFormat format = CSVFormat .RFC4180 .withEscape ('?' ).withDelimiter (',' ).withQuote (null ).withRecordSeparator (CRLF );
1185+ final CSVFormat format = CSVFormat .RFC4180 .withEscape ('?' ).withDelimiter (',' ).withQuote (null ).withRecordSeparator (CRLF );
11861186 format .print (in ,out ,true );
11871187 assertEquals ("x?,y?,x?r?na?,??b?,c?r?n" , out .toString ());
11881188 }
@@ -1191,17 +1191,17 @@ public void testPrintWithEscapesEndWithCRLF() throws IOException {
11911191 public void testPrintWithEscapesEndWithoutCRLF () throws IOException {
11921192 final Reader in = new StringReader ("x,y,x" );
11931193 final Appendable out = new StringBuilder ();
1194- CSVFormat format = CSVFormat .RFC4180 .withEscape ('?' ).withDelimiter (',' ).withQuote (null ).withRecordSeparator (CRLF );
1194+ final CSVFormat format = CSVFormat .RFC4180 .withEscape ('?' ).withDelimiter (',' ).withQuote (null ).withRecordSeparator (CRLF );
11951195 format .print (in ,out ,true );
11961196 assertEquals ("x?,y?,x" , out .toString ());
11971197 }
11981198
11991199 @ Test
12001200 public void testFormatToString () throws IOException {
1201- CSVFormat format = CSVFormat .RFC4180 .withEscape ('?' ).withDelimiter (',' )
1202- .withQuoteMode (QuoteMode .MINIMAL ).withRecordSeparator (CRLF ).withQuote ('"' ).withNullString ("" ).withIgnoreHeaderCase (true )
1201+ final CSVFormat format = CSVFormat .RFC4180 .withEscape ('?' ).withDelimiter (',' )
1202+ .withQuoteMode (QuoteMode .MINIMAL ).withRecordSeparator (CRLF ).withQuote ('"' )
1203+ .withNullString ("" ).withIgnoreHeaderCase (true )
12031204 .withHeaderComments ("This is HeaderComments" ).withHeader ("col1" ,"col2" ,"col3" );
1204- System .out .print (format .toString ());
12051205 assertEquals ("Delimiter=<,> Escape=<?> QuoteChar=<\" > QuoteMode=<MINIMAL> NullString=<> RecordSeparator=<" +CRLF +
12061206 "> IgnoreHeaderCase:ignored SkipHeaderRecord:false HeaderComments:[This is HeaderComments] Header:[col1, col2, col3]" , format .toString ());
12071207 }
0 commit comments