From 814bfc8adc128ed050f2b60a423beb86e00fc6ec Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 25 Dec 2019 06:59:43 +0900 Subject: [ruby/csv] Fix a parse bug when split character exists in middle of column value GitHub: fix #115 Reported by TOMITA Masahiro. Thanks!!! https://github.com/ruby/csv/commit/398b3564c5 --- test/csv/parse/test_strip.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/csv') diff --git a/test/csv/parse/test_strip.rb b/test/csv/parse/test_strip.rb index 0255bb9a30..3564fcb3ba 100644 --- a/test/csv/parse/test_strip.rb +++ b/test/csv/parse/test_strip.rb @@ -21,6 +21,11 @@ class TestCSVParseStrip < Test::Unit::TestCase CSV.parse_line(%Q{a ,b }, strip: true)) end + def test_middle + assert_equal(["a b"], + CSV.parse_line(%Q{a b}, strip: true)) + end + def test_quoted assert_equal([" a ", " b "], CSV.parse_line(%Q{" a "," b "}, strip: true)) -- cgit v1.2.3