summaryrefslogtreecommitdiff
path: root/test/csv
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-16 06:31:31 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-16 06:31:31 +0000
commit066b30245bea02bf217ea6b49fd2e906781e67c1 (patch)
treec087805f295aee1cd8712be97dd2e9ccbe711da8 /test/csv
parent2ac5cdd07a2ce703750d69e0cbdc90b2f2572a5b (diff)
rescue Encoding::ConverterNotFoundError.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/csv')
-rw-r--r--test/csv/test_encodings.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/csv/test_encodings.rb b/test/csv/test_encodings.rb
index 63f7207..5d29ac1 100644
--- a/test/csv/test_encodings.rb
+++ b/test/csv/test_encodings.rb
@@ -197,8 +197,12 @@ class TestEncodings < Test::Unit::TestCase
def test_can_write_csv_in_any_encoding
each_encoding do |encoding|
# test generate_line with encoding hint
- csv = %w[abc d|ef].map { |f| f.encode(encoding) }.
- to_csv(col_sep: "|", encoding: encoding.name)
+ begin
+ csv = %w[abc d|ef].map { |f| f.encode(encoding) }.
+ to_csv(col_sep: "|", encoding: encoding.name)
+ rescue Encoding::ConverterNotFoundError
+ next
+ end
assert_equal(encoding, csv.encoding)
# test generate_line with encoding guessing from fields