aboutsummaryrefslogtreecommitdiffstats
path: root/test/csv/parse
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/csv] test: reduce size for stability on GitHub ActionsSutou Kouhei2021-12-241-1/+1
| | | | https://github.com/ruby/csv/commit/68461aead5
* [ruby/csv] Revert "parser: fix a keep bug that some texts may be dropped ↵Sutou Kouhei2021-12-241-37/+0
| | | | | | | | | | unexpectedly" This reverts commit https://github.com/ruby/csv/commit/5c6523da0a61. This introduces another pbolem. We should try again later. https://github.com/ruby/csv/commit/43a1d6fff1
* [ruby/csv] parser: fix a keep bug that some texts may be dropped unexpectedlySutou Kouhei2021-12-241-0/+37
| | | | | | | | Ruby: [Bug #18245] [ruby-core:105587] Reported by Hassan Abdul Rehman. https://github.com/ruby/csv/commit/5c6523da0a
* [ruby/csv] Add handling for ambiguous parsing options ↵adamroyjones2021-12-241-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://github.com/ruby/csv/pull/226) GitHub: fix GH-225 With Ruby 3.0.2 and csv 3.2.1, the file ```ruby require "csv" File.open("example.tsv", "w") { |f| f.puts("foo\t\tbar") } CSV.read("example.tsv", col_sep: "\t", strip: true) ``` produces the error ``` lib/csv/parser.rb:935:in `parse_quotable_robust': TODO: Meaningful message in line 1. (CSV::MalformedCSVError) ``` However, the CSV in this example is not malformed; instead, ambiguous options were provided to the parser. It is not obvious (to me) whether the string should be parsed as - `["foo\t\tbar"]`, - `["foo", "bar"]`, - `["foo", "", "bar"]`, or - `["foo", nil, "bar"]`. This commit adds code that raises an exception when this situation is encountered. Specifically, it checks if the column separator either ends with or starts with the characters that would be stripped away. This commit also adds unit tests and updates the documentation. https://github.com/ruby/csv/commit/cc317dd42d
* [ruby/csv] Fix typos [ci skip] (https://github.com/ruby/csv/pull/224)Nobuyoshi Nakada2021-12-241-1/+1
| | | | https://github.com/ruby/csv/commit/27c0b66c8f
* Prepare for removing RubyVM::JIT (#5262)Takashi Kokubun2021-12-131-1/+1
|
* [ruby/csv] Changed line ending handling to consider the combination \r\n as ↵Joakim Antman2021-10-241-0/+13
| | | | | | a single entry when row is faulty (https://github.com/ruby/csv/pull/220) https://github.com/ruby/csv/commit/29cef9ea9d
* Rename RubyVM::MJIT to RubyVM::JITTakashi Kokubun2021-01-131-1/+1
| | | | | | | | because the name "MJIT" is an internal code name, it's inconsistent with --jit while they are related to each other, and I want to discourage future JIT implementation-specific (e.g. MJIT-specific) APIs by this rename. [Feature #17490]
* [ruby/csv] Add support for \r\n with skip_lines: /...$/ againSutou Kouhei2020-11-241-0/+6
| | | | | | | | GitHub: fix GH-194 Reported by Josef Šimánek. Thanks!!! https://github.com/ruby/csv/commit/fd86afe081
* [ruby/csv] Fix a parse bug when split character exists in middle of column valueSutou Kouhei2020-07-201-0/+5
| | | | | | | | GitHub: fix #115 Reported by TOMITA Masahiro. Thanks!!! https://github.com/ruby/csv/commit/398b3564c5
* [ruby/csv] Do not loop forever when skip_lines regexp matches zero length ↵Mike MacDonald2020-07-201-0/+7
| | | | | | | | | | | | | | with anchors (#110) * Do not loop forever when skip_lines regexp matches zero length with anchors * Remove needless white spaces * Add missing eos check in skip_needless_lines * Simplify test https://github.com/ruby/csv/commit/3b15d4a3e8
* Fixed for older versionsNobuyoshi Nakada2020-02-261-1/+4
| | | | | Fix up 66d1900423e6fb9774c2fe72dba8c2968b54d7ab, `RubyVM::MJIT` is available since ruby 2.6.
* Increase timeout for CSV test with --jit-waitTakashi Kokubun2020-02-251-1/+2
| | | | | To prevent CI failures like http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2739995
* Import CSV 3.1.2 (#2547)Sutou Kouhei2019-10-123-5/+15
|
* Fix keyword argument warnings in the tests from Class#newJeremy Evans2019-09-062-3/+3
| | | | This were previously hidden because calls from C were not warned.
* Fix keyword argument separation warnings in testJeremy Evans2019-08-301-2/+2
|
* [ruby/csv] Fix a bug that strip: true removes newlinesKouhei Sutou2019-07-141-0/+30
| | | | https://github.com/ruby/csv/commit/5540d35a30
* [ruby/csv] Don't raise on eof?Kouhei Sutou2019-07-141-0/+3
| | | | | | | | GitHub: fix #86 Reported by krororo. Thanks!!! https://github.com/ruby/csv/commit/5a8d9d9297
* Import CSV 3.0.8kou2019-04-147-6/+371
| | | | | | | | This includes performance improvements and backward incompatibility fixes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Upgrade CSV to 3.0.4kou2019-01-258-0/+1003
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e