summaryrefslogtreecommitdiff
path: root/test/csv/test_row.rb
diff options
context:
space:
mode:
authorjeg2 <jeg2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-25 00:54:38 +0000
committerjeg2 <jeg2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-25 00:54:38 +0000
commitdfda5877ca1f224b49ed17af1d44781fb2717a31 (patch)
tree02ba7391940c38967d801e8804939a1a20022982 /test/csv/test_row.rb
parent7222e82a8b98afdc61b9cf6ad7419068429a42e9 (diff)
* lib/csv.rb: Fixed a bug in read_to_char() that would slurp
whole files if the encoding was invalid. It will now read up to 10 bytes ahead to find a valid character boundary or give up. [ruby-core:19465] * test/csv/test_features.rb, test/csv/test_table.rb, test/csv/test_row.rb: Loosened some tests to check for a compatible? Encoding instea of an exact Encoding. [ruby-core:19470] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/csv/test_row.rb')
-rw-r--r--test/csv/test_row.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/csv/test_row.rb b/test/csv/test_row.rb
index bd0aad4104..d0b0cdc406 100644
--- a/test/csv/test_row.rb
+++ b/test/csv/test_row.rb
@@ -296,8 +296,10 @@ class TestCSVRow < Test::Unit::TestCase
end
end
- def test_inspect_is_ascii_8bit_encoded
- assert_equal("ASCII-8BIT", @row.inspect.encoding.name)
+ def test_inspect_encoding_is_ascii_compatible
+ assert( Encoding.compatible?( Encoding.find("US-ASCII"),
+ @row.inspect.encoding ),
+ "inspect() was not ASCII compatible." )
end
def test_inspect_shows_symbol_headers_as_bare_attributes