You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class ChoTests
{
[Fact]
public void CanReadTabDelimitedWithBlankFieldValue()
{
using (var reader = ChoTSVReader.LoadText("A\t\tB").ErrorMode(ChoErrorMode.ThrowAndStop))
{
foreach(var record in reader)
{
Assert.NotNull(record);
Assert.Equal("A", record.Column1);
Assert.Null(record.Column2);
Assert.Equal("B", record.Column3);
}
}
}
}
`
This throws an exception, when it should gracefully populate the record.
It is apparently a side effect of the delimiter (tab) being considered whitespace.
Stack trace:
`
at ChoETL.ChoUtility.RightOf(String source, String searchText)
at ChoETL.ChoCSVRecordReader.GetFieldValues(String line)
at ChoETL.ChoCSVRecordReader.FillRecord(Object rec, Tuple2 pair)
at ChoETL.ChoCSVRecordReader.LoadLine(Tuple2 pair, Object& rec)
at ChoETL.ChoCSVRecordReader.AsEnumerable(Object source, TraceSwitch traceSwitch, Func2 filterFunc)+MoveNext()
at ChoETL.ChoEnumeratorWrapper.BuildEnumerable[T](Func1 moveNext, Func1 current, Action dispose)+MoveNext()
`
The text was updated successfully, but these errors were encountered:
Unit test to reproduce the problem:
`
`
This throws an exception, when it should gracefully populate the record.
It is apparently a side effect of the delimiter (tab) being considered whitespace.
Stack trace:
`
at ChoETL.ChoUtility.RightOf(String source, String searchText)
at ChoETL.ChoCSVRecordReader.GetFieldValues(String line)
at ChoETL.ChoCSVRecordReader.FillRecord(Object rec, Tuple2 pair)
at ChoETL.ChoCSVRecordReader.LoadLine(Tuple2 pair, Object& rec)
at ChoETL.ChoCSVRecordReader.AsEnumerable(Object source, TraceSwitch traceSwitch, Func2 filterFunc)+MoveNext()
at ChoETL.ChoEnumeratorWrapper.BuildEnumerable[T](Func1 moveNext, Func1 current, Action dispose)+MoveNext()
`
The text was updated successfully, but these errors were encountered: