diff options
author | Sutou Kouhei <kou@clear-code.com> | 2019-12-25 06:59:43 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-07-20 02:32:49 +0900 |
commit | 814bfc8adc128ed050f2b60a423beb86e00fc6ec (patch) | |
tree | de96cc1881cf72874496ce95857c93ff611f34e2 /test/csv/parse | |
parent | aeac7db8236ad43d8c8992fd1b9d120d567754ec (diff) | |
download | ruby-814bfc8adc128ed050f2b60a423beb86e00fc6ec.tar.gz |
[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
Diffstat (limited to 'test/csv/parse')
-rw-r--r-- | test/csv/parse/test_strip.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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)) |