Sha256: 5eece3349b744e62dc62c5d6d13d8356be5071f80b96467855be7091223e7c18

Contents?: true

Size: 494 Bytes

Versions: 4

Compression:

Stored size: 494 Bytes

Contents

require File.join(File.expand_path(File.dirname(__FILE__)), '../../', 'test_helper.rb')
require 'rbbt/tsv'
require 'rbbt/tsv/field_index'

class TestTSVFieldIndex < Test::Unit::TestCase

  def test_zipped
    content =<<-EOF
#Id    ValueA    ValueB ValueC
rowA    A|AA    B|BB  C|CC
rowa    a|aa    b|BB  C|CC
    EOF

    TmpFile.with_file(content) do |filename|
      tsv = TSV.open(File.open(filename), :sep => /\s+/, :type => :double)
      puts tsv.field_index("ValueA")
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rbbt-util-5.6.10 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.6.9 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.6.8 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.6.7 test/rbbt/tsv/test_field_index.rb