Test added to TsvCsvImporterTests for multiple blank lines in quoted CSV value, see issue #19. Test does not pass, so is enabled=false and grouped as 'broken'.
git-svn-id: http://google-refine.googlecode.com/svn/trunk@794 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
075e985865
commit
7886016dd1
@ -345,7 +345,7 @@ public class TsvCsvImporterTests {
|
|||||||
Assert.assertEquals(project.rows.get(0).cells.get(0).value, "data-row1-cell1");
|
Assert.assertEquals(project.rows.get(0).cells.get(0).value, "data-row1-cell1");
|
||||||
Assert.assertEquals(project.rows.get(0).cells.get(1).value, "data-row1-cell2");
|
Assert.assertEquals(project.rows.get(0).cells.get(1).value, "data-row1-cell2");
|
||||||
Assert.assertEquals(project.rows.get(0).cells.get(2).value, "data-row1-cell3");
|
Assert.assertEquals(project.rows.get(0).cells.get(2).value, "data-row1-cell3");
|
||||||
Assert.assertEquals(project.rows.get(1).cells.size(), 3);
|
Assert.assertEquals(project.rows.get(1).cells.size(), 2);
|
||||||
Assert.assertEquals(project.rows.get(1).cells.get(0).value, "data-row2-cell1");
|
Assert.assertEquals(project.rows.get(1).cells.get(0).value, "data-row2-cell1");
|
||||||
Assert.assertEquals(project.rows.get(1).cells.get(1).value, "data-row2-cell2");
|
Assert.assertEquals(project.rows.get(1).cells.get(1).value, "data-row2-cell2");
|
||||||
}
|
}
|
||||||
@ -369,6 +369,26 @@ public class TsvCsvImporterTests {
|
|||||||
Assert.assertEquals(project.rows.get(0).cells.get(0).value, "\"To\n Be\" is often followed by \"or not To\n Be\"");
|
Assert.assertEquals(project.rows.get(0).cells.get(0).value, "\"To\n Be\" is often followed by \"or not To\n Be\"");
|
||||||
Assert.assertEquals(project.rows.get(0).cells.get(1).value, "data2");
|
Assert.assertEquals(project.rows.get(0).cells.get(1).value, "data2");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test(enabled=false, groups={"broken"})
|
||||||
|
public void readWithMultiLinedQuotedDataAndBlankLines(){
|
||||||
|
String input = "col1,col2,col3\n" +
|
||||||
|
"\"\"\"To\n Be\"\" is often followed by \"\"or not To\n\n\n\n\n Be\"\"\",data2";
|
||||||
|
LineNumberReader lnReader = new LineNumberReader(new StringReader(input));
|
||||||
|
try {
|
||||||
|
SUT.read(lnReader, project, null, -1, 0, 0, 1, false, true);
|
||||||
|
} catch (IOException e) {
|
||||||
|
Assert.fail();
|
||||||
|
}
|
||||||
|
Assert.assertEquals(project.columnModel.columns.size(), 3);
|
||||||
|
Assert.assertEquals(project.columnModel.columns.get(0).getName(), "col1");
|
||||||
|
Assert.assertEquals(project.columnModel.columns.get(1).getName(), "col2");
|
||||||
|
Assert.assertEquals(project.columnModel.columns.get(2).getName(), "col3");
|
||||||
|
Assert.assertEquals(project.rows.size(), 1);
|
||||||
|
Assert.assertEquals(project.rows.get(0).cells.size(), 2);
|
||||||
|
Assert.assertEquals(project.rows.get(0).cells.get(0).value, "\"To\n Be\" is often followed by \"or not To\n\n\n\n\n Be\"");
|
||||||
|
Assert.assertEquals(project.rows.get(0).cells.get(1).value, "data2");
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------read tests------------------------
|
//---------------------read tests------------------------
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
Reference in New Issue
Block a user