diff --git a/source/Sylvan.Data.Csv.Tests/CsvDataReaderTests.cs b/source/Sylvan.Data.Csv.Tests/CsvDataReaderTests.cs index ee39f611..0b2331d7 100644 --- a/source/Sylvan.Data.Csv.Tests/CsvDataReaderTests.cs +++ b/source/Sylvan.Data.Csv.Tests/CsvDataReaderTests.cs @@ -152,7 +152,10 @@ public async Task PartialRecord() [Fact] public async Task Quoted() { - using (var reader = File.OpenText("Data/Quote.csv")) + var data = + "Id,Name,Value,Date\n1,John,\"Very\nLow\n\",2000-11-11\n2,Jane,\"\"\"High\"\"\",\"1989-03-14\"\n3,Comma,\"Quite, Common\",2020-05-29\n"; + + using (var reader = new StringReader(data)) { var csv = await CsvDataReader.CreateAsync(reader); Assert.Equal(4, csv.FieldCount); @@ -166,7 +169,7 @@ public async Task Quoted() Assert.Equal(1, csv.RowNumber); Assert.Equal("1", csv[0]); Assert.Equal("John", csv[1]); - Assert.Equal($"Very{Environment.NewLine}Low{Environment.NewLine}", csv[2]); + Assert.Equal($"Very\nLow\n", csv[2]); Assert.Equal("2000-11-11", csv[3]); Assert.True(await csv.ReadAsync()); Assert.Equal(2, csv.RowNumber); diff --git a/source/Sylvan.Data.Csv.Tests/Data/Quote.csv b/source/Sylvan.Data.Csv.Tests/Data/Quote.csv deleted file mode 100644 index 0f016dfd..00000000 --- a/source/Sylvan.Data.Csv.Tests/Data/Quote.csv +++ /dev/null @@ -1,6 +0,0 @@ -Id,Name,Value,Date -1,John,"Very -Low -",2000-11-11 -2,Jane,"""High""","1989-03-14" -3,Comma,"Quite, Common",2020-05-29 \ No newline at end of file