Sha256: f5fecac52c23f1e9782f8e8f706c5139985f964636acb692b6a18103bedd9f63
Contents?: true
Size: 648 Bytes
Versions: 45
Compression:
Stored size: 648 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../test_helper') require 'rbbt/tsv' require 'rbbt/tsv/marshal' require 'rbbt/util/tmpfile' require 'test/unit' class TestTSVUtil < Test::Unit::TestCase def test_marshal content =<<-EOF #Id ValueA ValueB OtherID row1 a|aa|aaa b Id1|Id2 row2 A B Id3 EOF TmpFile.with_file(content) do |filename| tsv = TSV.open(filename, :sep => /\s+/) assert TSV === Marshal.load(Marshal.dump(tsv)) assert_equal tsv.to_hash, Marshal.load(Marshal.dump(tsv)).to_hash assert_equal({1 => 1}, Marshal.load(Marshal.dump({1 => 1}))) end end end
Version data entries
45 entries across 45 versions & 1 rubygems