diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/csv/test_features.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/csv/test_features.rb b/test/csv/test_features.rb index a558875522..65ef3da105 100755 --- a/test/csv/test_features.rb +++ b/test/csv/test_features.rb @@ -104,6 +104,20 @@ class TestCSV::Features < TestCSV assert_equal($/, CSV.new(STDERR).row_sep) end + def test_line + lines = [ + %Q(abc,def\n), + %Q(abc,"d\nef"\n), + %Q(abc,"d\r\nef"\n), + %Q(abc,"d\ref") + ] + csv = CSV.new(lines.join('')) + lines.each do |line| + csv.shift + assert_equal(line, csv.line) + end + end + def test_lineno assert_equal(5, @sample_data.lines.to_a.size) |