Sha256: 6c18b11f1898c03dfd81f75330e913d93e15c3b167c26d0d65b898691ad97d20

Contents?: true

Size: 522 Bytes

Versions: 822

Compression:

Stored size: 522 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_field_index
    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)
      assert_equal ["rowA"], tsv.field_index("ValueA")["A"]
    end
  end
end

Version data entries

822 entries across 822 versions & 1 rubygems

Version Path
rbbt-util-5.43.0 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.42.0 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.41.1 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.41.0 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.40.5 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.40.4 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.40.3 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.40.0 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.39.0 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.38.1 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.38.0 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.37.16 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.37.15 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.37.14 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.37.13 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.37.12 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.37.11 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.37.10 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.37.9 test/rbbt/tsv/test_field_index.rb
rbbt-util-5.37.8 test/rbbt/tsv/test_field_index.rb