summaryrefslogtreecommitdiff
path: root/test/csv
diff options
context:
space:
mode:
authorSutou Kouhei <kou@clear-code.com>2019-12-25 06:59:43 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-07-20 02:32:49 +0900
commit814bfc8adc128ed050f2b60a423beb86e00fc6ec (patch)
treede96cc1881cf72874496ce95857c93ff611f34e2 /test/csv
parentaeac7db8236ad43d8c8992fd1b9d120d567754ec (diff)
[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
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3332
Diffstat (limited to 'test/csv')
-rw-r--r--test/csv/parse/test_strip.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/csv/parse/test_strip.rb b/test/csv/parse/test_strip.rb
index 0255bb9..3564fcb 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))