Skip to content
Snippets Groups Projects
Commit afe31a18 authored by felmer's avatar felmer
Browse files

SE-175 bug in test fixed

SVN: 13943
parent b208444b
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ import ch.systemsx.cisd.etlserver.utils.TabSeparatedValueTable;
public class TSVOutputWriterTest extends AssertJUnit
{
@Test
public void test()
public void testIgnoringEmptyLines()
{
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
TSVOutputWriter writer = new TSVOutputWriter(new OutputStreamAdapter(outputStream));
......@@ -47,6 +47,20 @@ public class TSVOutputWriterTest extends AssertJUnit
writer.write(columns);
assertEquals("a\tb" + LINE_SEPARATOR + "11\t12" + LINE_SEPARATOR, outputStream.toString());
}
@Test
public void testWithEmptyLines()
{
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
TSVOutputWriter writer = new TSVOutputWriter(new OutputStreamAdapter(outputStream));
String content = "a\tb\n11\t12\n\n";
TabSeparatedValueTable table = new TabSeparatedValueTable(new StringReader(content), content, false);
List<Column> columns = table.getColumns();
writer.write(columns);
assertEquals("a\tb" + LINE_SEPARATOR + "11\t12" + LINE_SEPARATOR + "\t" + LINE_SEPARATOR, outputStream.toString());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment