diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-09 04:39:16 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-09 04:39:16 +0000 |
commit | 5c1941a9be56a979c27d740370b781882d344f79 (patch) | |
tree | 7478e42cde5b470b4df2eb40f89ee25f2621f5aa /test/csv/test_features.rb | |
parent | dfc56b8c432d6a374c18cba7048d05175bcfba05 (diff) |
Merge csv-1.0.2 from upstream.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/csv/test_features.rb')
-rwxr-xr-x | test/csv/test_features.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/csv/test_features.rb b/test/csv/test_features.rb index 6dc6d34d46..a851c908f0 100755 --- a/test/csv/test_features.rb +++ b/test/csv/test_features.rb @@ -4,9 +4,7 @@ # tc_features.rb # -# Created by James Edward Gray II on 2005-10-31. -# Copyright 2005 James Edward Gray II. You can redistribute or modify this code -# under the terms of Ruby's license. +# Created by James Edward Gray II on 2005-10-31. begin require "zlib" @@ -313,7 +311,7 @@ class TestCSV::Features < TestCSV def test_inspect_encoding_is_ascii_compatible csv = CSV.new("one,two,three\n1,2,3\n".encode("UTF-16BE")) assert_send([Encoding, :compatible?, - Encoding.find("US-ASCII"), csv.inspect.encoding], + Encoding.find("US-ASCII"), csv.inspect.encoding], "inspect() was not ASCII compatible.") end @@ -321,7 +319,7 @@ class TestCSV::Features < TestCSV assert_not_nil(CSV::VERSION) assert_instance_of(String, CSV::VERSION) assert_predicate(CSV::VERSION, :frozen?) - assert_match(/\A\d\.\d\.\d\Z/, CSV::VERSION) + assert_match(/\A\d\.\d\.\d\z/, CSV::VERSION) end def test_accepts_comment_skip_lines_option @@ -352,11 +350,13 @@ class TestCSV::Features < TestCSV end def test_comment_rows_are_ignored_with_heredoc - c = CSV.new(<<~EOL, skip_lines: ".") - 1,foo - .2,bar - 3,baz + sample_data = <<~EOL + 1,foo + .2,bar + 3,baz EOL + + c = CSV.new(sample_data, skip_lines: ".") assert_equal [["1", "foo"], ["3", "baz"]], c.each.to_a end |