diff options
Diffstat (limited to 'test/csv/parse/test_liberal_parsing.rb')
-rw-r--r-- | test/csv/parse/test_liberal_parsing.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/csv/parse/test_liberal_parsing.rb b/test/csv/parse/test_liberal_parsing.rb index 2f7b34689f..5796d10828 100644 --- a/test/csv/parse/test_liberal_parsing.rb +++ b/test/csv/parse/test_liberal_parsing.rb @@ -28,6 +28,17 @@ class TestCSVParseLiberalParsing < Test::Unit::TestCase CSV.parse_line(input, liberal_parsing: true)) end + def test_endline_after_quoted_field_end + csv = CSV.new("A\r\n\"B\"\nC\r\n", liberal_parsing: true) + assert_equal(["A"], csv.gets) + error = assert_raise(CSV::MalformedCSVError) do + csv.gets + end + assert_equal('Illegal end-of-line sequence outside of a quoted field <"\n"> in line 2.', + error.message) + assert_equal(["C"], csv.gets) + end + def test_quote_after_column_separator error = assert_raise(CSV::MalformedCSVError) do CSV.parse_line('is,this "three," or four,fields', liberal_parsing: true) |