Author: ggregory Date: Wed Jun 8 00:48:45 2016 New Revision: 1747331 URL: http://svn.apache.org/viewvc?rev=1747331&view=rev Log: Add tests for CSVFormat.equals for null quotes. Closes #12.
Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java?rev=1747331&r1=1747330&r2=1747331&view=diff ============================================================================== --- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java (original) +++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java Wed Jun 8 00:48:45 2016 @@ -172,6 +172,22 @@ public class CSVFormatTest { } @Test + public void testEqualsLeftNoQuoteRightQuote() { + final CSVFormat left = CSVFormat.newFormat(',').withQuote(null); + final CSVFormat right = left.withQuote('#'); + + assertNotEquals(left, right); + } + + @Test + public void testEqualsNoQuotes() { + final CSVFormat left = CSVFormat.newFormat(',').withQuote(null); + final CSVFormat right = left.withQuote(null); + + assertEquals(left, right); + } + + @Test public void testEqualsQuotePolicy() { final CSVFormat right = CSVFormat.newFormat('\'') .withQuote('"')