spec/lib/mender_spec.rb in masticate-0.4.0 vs spec/lib/mender_spec.rb in masticate-0.4.1
- old
+ new
@@ -49,6 +49,18 @@
results[:input_count].should == 6
results[:output_count].should == 4
output.should == correct_output
end
+
+ it "should consolidate fields with embedded delimiters" do
+ filename = File.dirname(__FILE__) + "/../data/buried_delims_in_input.psv"
+ tmp = Tempfile.new('mending')
+ results = Masticate.mend(filename, :col_sep => '|', :buried => 'Comment', :output => tmp)
+ output = File.read(tmp)
+ correct_output = File.read(File.dirname(__FILE__) + "/../data/delims_untangled.csv")
+
+ results[:input_count].should == 4
+ results[:output_count].should == 4
+ output.should == correct_output
+ end
end