test/rbbt/util/tsv/test_parse.rb in rbbt-util-2.0.1 vs test/rbbt/util/tsv/test_parse.rb in rbbt-util-2.1.0

- old
+ new

@@ -47,9 +47,24 @@ assert_equal ["ValueA", "ValueB"], extra[:fields] assert_equal ["a", "aa", "aaa"], data["row1"][0] end end + def test_unven_flat + content =<<-EOF +row1 a b +row2 A B C + EOF + + TmpFile.with_file(content) do |filename| + data = {} + data, extra = TSV.parse(File.open(filename), :type => :flat, :sep => /\s+/) + assert data["row2"].include? "C" + end + end + + + def test_options_line content =<<-EOF #: :sep=/\\s+/#:case_insensitive=true #Id ValueA ValueB row1 a|aa|aaa b