Skip to content

Commit 70b782d

Browse files
committed
Add tests for CSVFormat.equals for null quotes. Closes apache#12.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1747331 13f79535-47bb-0310-9956-ffa450edef68
1 parent b97cf1d commit 70b782d

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,22 @@ public void testEqualsQuoteChar() {
171171
assertNotEquals(right, left);
172172
}
173173

174+
@Test
175+
public void testEqualsLeftNoQuoteRightQuote() {
176+
final CSVFormat left = CSVFormat.newFormat(',').withQuote(null);
177+
final CSVFormat right = left.withQuote('#');
178+
179+
assertNotEquals(left, right);
180+
}
181+
182+
@Test
183+
public void testEqualsNoQuotes() {
184+
final CSVFormat left = CSVFormat.newFormat(',').withQuote(null);
185+
final CSVFormat right = left.withQuote(null);
186+
187+
assertEquals(left, right);
188+
}
189+
174190
@Test
175191
public void testEqualsQuotePolicy() {
176192
final CSVFormat right = CSVFormat.newFormat('\'')

0 commit comments

Comments
 (0)