Skip to content

Commit

Permalink
adding test for issue #449
Browse files Browse the repository at this point in the history
  • Loading branch information
jbax committed Apr 19, 2021
1 parent 4b7f233 commit 53026fb
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.univocity</groupId>
<artifactId>univocity-parsers</artifactId>
<version>2.9.1</version>
<version>2.9.2-SNAPSOHT</version>
<name>univocity-parsers</name>
<packaging>jar</packaging>
<description>univocity's open source parsers for processing different text formats using a consistent API</description>
Expand Down
36 changes: 36 additions & 0 deletions src/test/java/com/univocity/parsers/issues/github/Github_449.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package com.univocity.parsers.issues.github;

import com.univocity.parsers.csv.*;
import org.testng.annotations.*;


/**
* From: https://github.com/univocity/univocity-parsers/issues/438
*
* @author Univocity Software Pty Ltd - <a href="mailto:parsers@univocity.com">parsers@univocity.com</a>
*/
public class Github_449 {

@Test
public void testNoExceptionParsingLine(){
CsvParserSettings settings = new CsvParserSettings();
settings.getFormat().setDelimiter("|");
settings.setIgnoreLeadingWhitespaces(false);
settings.setInputBufferSize(128);

CsvParser parser = new CsvParser(settings);
String line = "XX |XXX-XXXX |XXXXXX " +
"|XXXXXXXX|XXXXX |XXXXXX " +
"|X|XXXXXXX|XXXXXXXX|XXXX|XXXXXXXXXXXXXXX |XXXXXXXXXXX" +
"|XXXXXX |XXXXXXXXXXXXXXXXXXXXXX|XXXXXX " +
"|XXXXXXXXXXXXXX|XXXXXX |XXXXXXXXXXXXXXXXXXXXXX" +
"|XXXXXX |XXXXXXXXXXXXXXXXXXXXXX|XXXXXX " +
"|XXXXXXXXX|XXXXXX |XXXXXXX| " +
"|| || " +
"|| ||XXXX-XX-XX 00:00:00.0000000" +
"||XXXXX.XXXXXXXXXXXXXXX|XXXXX.XXXXXXXXXXXXXX" +
"|XXXXX.XXXXXXXXXXXXXXX|X|XXXXXX |X";

parser.parseLine(line);
}
}

0 comments on commit 53026fb

Please sign in to comment.