Add testRfc4180QuoteSingleChar().
This commit is contained in:
parent
190390bf5d
commit
fa437cb924
|
@ -53,6 +53,7 @@ import org.junit.Test;
|
||||||
*/
|
*/
|
||||||
public class CSVPrinterTest {
|
public class CSVPrinterTest {
|
||||||
|
|
||||||
|
private static final char EURO_CH = '\u20AC';
|
||||||
private static final char DQUOTE_CHAR = '"';
|
private static final char DQUOTE_CHAR = '"';
|
||||||
private static final char BACKSLASH_CH = '\\';
|
private static final char BACKSLASH_CH = '\\';
|
||||||
private static final char QUOTE_CH = '\'';
|
private static final char QUOTE_CH = '\'';
|
||||||
|
@ -806,6 +807,15 @@ public class CSVPrinterTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testRfc4180QuoteSingleChar() throws IOException {
|
||||||
|
final StringWriter sw = new StringWriter();
|
||||||
|
try (final CSVPrinter printer = new CSVPrinter(sw, CSVFormat.RFC4180)) {
|
||||||
|
printer.printRecord(EURO_CH, "Deux");
|
||||||
|
assertEquals("\"" + EURO_CH + "\",Deux" + recordSeparator, sw.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPrinter2() throws IOException {
|
public void testPrinter2() throws IOException {
|
||||||
final StringWriter sw = new StringWriter();
|
final StringWriter sw = new StringWriter();
|
||||||
|
|
Loading…
Reference in New Issue