diff options
| author | jeg2 <jeg2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-25 00:54:38 +0000 |
|---|---|---|
| committer | jeg2 <jeg2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-25 00:54:38 +0000 |
| commit | bee29f23d2d11722746612454d87c7bd387dde34 (patch) | |
| tree | 02ba7391940c38967d801e8804939a1a20022982 /test/csv/test_table.rb | |
| parent | d5f7af1f9d565b59c710d7a61f629cf90cf28105 (diff) | |
| download | ruby-bee29f23d2d11722746612454d87c7bd387dde34.tar.gz ruby-bee29f23d2d11722746612454d87c7bd387dde34.tar.xz ruby-bee29f23d2d11722746612454d87c7bd387dde34.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@19931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/csv/test_table.rb')
| -rw-r--r-- | test/csv/test_table.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/csv/test_table.rb b/test/csv/test_table.rb index 3c3cb1c15..d0b4d1010 100644 --- a/test/csv/test_table.rb +++ b/test/csv/test_table.rb @@ -400,7 +400,9 @@ class TestCSVTable < Test::Unit::TestCase assert(str.include?("mode:#{@table.mode}"), "Mode not shown.") end - def test_inspect_is_us_ascii_encoded - assert_equal("US-ASCII", @table.inspect.encoding.name) + def test_inspect_encoding_is_ascii_compatible + assert( Encoding.compatible?( Encoding.find("US-ASCII"), + @table.inspect.encoding ), + "inspect() was not ASCII compatible." ) end end |
