test/csv/test_csv_parsing.rb in fastcsv-0.0.4 vs test/csv/test_csv_parsing.rb in fastcsv-0.0.5

- old
+ new

@@ -158,19 +158,19 @@ END_DATA lines = bad_data.lines.to_a assert_equal(6, lines.size) assert_match(/\Aline,4/, lines.find { |l| l =~ /some\rjunk/ }) - # csv = FastCSV.new(bad_data) - # begin - # loop do - # assert_not_nil(csv.shift) - # assert_send([csv.lineno, :<, 5]) # FIXME 4 - # end - # rescue FastCSV::MalformedCSVError - # assert_equal( "Unquoted fields do not allow \\r or \\n (line 4).", - # $!.message ) - # end + csv = FastCSV.new(bad_data) + begin + loop do + assert_not_nil(csv.shift) + assert_send([csv.lineno, :<, 5]) # FIXME 4 + end + rescue FastCSV::MalformedCSVError + assert_equal( "Unquoted fields do not allow \\r or \\n (line 4).", + $!.message ) + end assert_raise(FastCSV::MalformedCSVError) { FastCSV.parse_line('1,2,"3...') } bad_data = <<-END_DATA.gsub(/^ +/, "") line,1,abc