Sha256: 605e71cfadc7eae42d0366e237a0f3804d7d7ec89abfdcc38e49a473266440ce
Contents?: true
Size: 713 Bytes
Versions: 2
Compression:
Stored size: 713 Bytes
Contents
#!/usr/local/bin/ruby -w # tc_encodings.rb # # Created by Michael Reinsch. # Copyright (c) 2012 Ubiquitous Business Technology, Inc. require "test/unit" require "faster_csv" class TestEncodings < Test::Unit::TestCase def test_with_shift_jis_encoding $KCODE = 'u' # make sure $KCODE != Shift_JIS # this test data will not work with UTF-8 encoding shift_jis_data = [ "82D082E782AA82C82094E0", "82D082E7826082AA825C", "82D082E7826082AA82C8" ].map { |f| [f].pack("H*") } fields = FCSV.parse_line( shift_jis_data.map { |f| %Q{"#{f}"} }.join(","), :encoding => "s" ) assert_equal(shift_jis_data, fields) end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
asana2flowdock-1.0.0 | vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_encodings.rb |
fastercsv-1.5.5 | test/tc_encodings.rb |