aboutsummaryrefslogtreecommitdiffstats
path: root/test/csv
Commit message (Collapse)AuthorAgeFilesLines
* Adding a liberal_parsing option to CSV. Patch by Braden Anderson.jeg22016-01-011-0/+23
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-1611-0/+11
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: accept to use Range object for row selection.hsbt2015-06-172-0/+6
| | | | | | [Feature #11267][ruby-dev:49091] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/csv/test_row.rb: Added some missing tests in CSV.hsbt2014-09-052-0/+18
| | | | | | * test/csv/test_table.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/with_different_ofs.rb: move into test library directory.hsbt2014-06-261-1/+1
| | | | | | | * test/csv/base.rb: fix require path for with_different_ofs.rb. * test/digest/test_digest_extend.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* csv.rb: honor encoding optionnobu2014-06-101-0/+8
| | | | | | | | * lib/csv.rb (CSV#<<): honor explicity given encoding. based on the patch by DAISUKE TANIWAKI <daisuketaniwaki AT gmail.com> at [ruby-core:62113]. [Bug #9766] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb (CSV.open): Close the opened file when an exception occur.akr2014-05-291-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_features.rb: fix up r46123nobu2014-05-261-6/+8
| | | | | | | * test/csv/test_features.rb: no longer `nil` is valid data source for `CSV.new`. [GH-580] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Reject nil as data source for CSV.new, patch by @Peeja.zzak2014-05-251-0/+6
| | | | | | | [Fixes GH-580] https://github.com/ruby/ruby/pull/580 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Symbol HeaderConverter: strip leading/trailing space.jeg22014-04-011-3/+4
| | | | | | | | | Reported by Skye Shaw [Fixes GH-575] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Don't attempt to convert nil headers.jeg22014-04-011-0/+7
| | | | | | | | Reported by Skye Shaw git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Fixed a broken regular expression that was causingjeg22014-03-201-0/+8
| | | | | | | | | | | CSV to miss escaping some special meaning characters when used in parsing. Reported by David Unric [ruby-core:54986] [Bug #8405] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/csv/test_data_converters.rb: use descriptive assertions.nobu2014-03-017-75/+65
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Optimize header hashes by freezing string keys.jeg22013-11-242-1/+25
| | | | | | | | [ruby-core:58510] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: If skip_lines is set to a String, convert it to a Regexpjeg22013-11-231-2/+9
| | | | | | | | | to prevent the alternative, which is that each line in the CSV gets converted to a Regexp when calling skip_lines#match. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* csv.rb: foreach enumeratornobu2013-10-041-0/+6
| | | | | | | | * lib/csv.rb (CSV.foreach): support enumerator. based on a patch by Hanmac (Hans Mackowiak) at [ruby-core:57643]. [ruby-core:57283] [Feature #8929] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encdb.c, encoding.c: make BOM-encodings dummynobu2013-09-241-1/+0
| | | | | | | * enc/encdb.c (ENC_DUMMY_UNICODE): make BOM-encodings dummy. * encoding.c (enc_autoload): keep dummy encodings dummy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_encodings.rb: remove BOM encodingsnobu2013-09-241-0/+1
| | | | | | | * test/csv/test_encodings.rb (TestCSV#each_encoding): encodings with BOM are external use only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/csv/test_features.rb, test/logger/test_logger.rbakr2013-04-201-22/+22
| | | | | | | | | | | | | | | | | | test/mkmf/test_have_macro.rb, test/net/http/test_http.rb, test/openssl/test_config.rb, test/psych/test_encoding.rb, test/psych/test_exception.rb, test/psych/test_psych.rb, test/psych/test_tainted.rb, test/readline/test_readline.rb, test/rexml/test_contrib.rb, test/ruby/test_autoload.rb, test/ruby/test_beginendblock.rb, test/ruby/test_exception.rb, test/ruby/test_file.rb, test/ruby/test_io.rb, test/ruby/test_marshal.rb, test/ruby/test_process.rb, test/ruby/test_require.rb, test/ruby/test_rubyoptions.rb, test/syslog/test_syslog_logger.rb, test/webrick/test_httpauth.rb, test/zlib/test_zlib.rb: Use Tempfile.create. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Remove the dangerous serialization feature.jeg22013-02-052-159/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Added more Hash methods to CSV::Row.jeg22012-12-271-0/+27
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: A fix for row comparison by Stephen Wattam. [Bug #7528]jeg22012-12-071-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove trainling spaces.nobu2012-08-212-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Fixes #161 on githubjeg22012-08-201-0/+33
| | | | | | | | | | * lib/csv.rb: You can now specify a pattern for :skip_lines. Matching lines will not be passed to the CSV parser. * lib/csv.rb: Patch by Christian Schwartz. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/csv/test_features.rb: add require for Tempfile.nagachika2012-07-072-0/+2
| | | | | | * test/csv/test_serialization.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test: fix test conditionsnobu2012-05-081-3/+6
| | | | | | | | | | | | | | * test/csv/test_features.rb (TestCSV#test_gzip_reader_bug_fix): test only if zlib is available. * test/csv/test_features.rb (TestCSV#test_gzip_writer_bug_fix): ditto. * test/open-uri/test_open-uri.rb (TestOpenURI#test_content_encoding): ditto. * test/rexml/test_order.rb (OrderTester#test_more_ordering): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test: why believe source directories are writable always?nobu2012-05-083-9/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Do not modify CSV.generate's argument [ruby-core:38356]marcandre2011-07-211-0/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Enhance each() to support Enumerator.jeg22011-05-261-0/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Improved stray quoting error message (patch by Edvard Majakari).jeg22011-05-252-4/+15
| | | | | | | * lib/csv.rb: Remove debugging prints. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb (CSV::open): suppress universal newline decorator.nobu2011-04-271-0/+15
| | | | | | fixes #4603 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strip trailing spaces.nobu2011-04-263-34/+34
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit.rb: Add new options; --jobs,-j,--ruby,--jobs-status,sorah2011-02-221-1/+1
| | | | | | | | | | --no-retry. [Feature #4415] [ruby-dev:43226],[ruby-dev:43222],[ruby-core:35294] * lib/test/unit/parallel.rb: Used at test/unit --jobs(-j) option. * test/csv/test_serialization.rb: test/unit parallel running ready. * test/rake/test_file_task.rb: test/unit parallel running ready. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/with_different_ofs.rb (DifferentOFS): should not affectnobu2010-12-2610-10/+10
| | | | | | original classes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/csv: DifferentOFS needs to be include in each classes.nobu2010-12-2511-1/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/with_different_ofs.rb: fixed typos.nobu2010-12-2511-21/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/with_diffent_ofs.rb (DifferentOFS): test suite for testnobu2010-12-251-14/+3
| | | | | | | | suites affected by $,. * test/digest/test_digest_extend.rb (TestDigestExtend): should not assume $, invariant. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/csv/test_data_converters.rb, test/csv/test_table.rb: don'tnobu2010-12-252-13/+17
| | | | | | not call setup within tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb (CSV.foreach): 'rb' mode is defaulted in open.nobu2010-12-251-0/+17
| | | | | | | * lib/csv.rb (CSV#init_separators): cannonicalize encoding options as Encoding objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/csv/base.rb (TestCSV.with_diffrent_ofs): give name tonobu2010-12-251-1/+1
| | | | | | anonymous classes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb (CSV#init_separators): use IO#gets with lengthnobu2010-12-251-1/+17
| | | | | | parameter to get rid of wrong convertion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb (CSV::foreach, CSV#initialize): directly use encodingnobu2010-12-251-4/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb, test/csv: should not assume $, invariant.nobu2010-12-2511-47/+69
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/csv/test_encodings.rb (TestEncodings#setup): fix evil testnobu2010-12-251-2/+5
| | | | | | | suite writing to the source directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Upgrading output encoding with ASCII content jeg22010-11-171-0/+8
| | | | | | | | as needed. [ruby-core:33229] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Upgrading output encoding as needed. [ruby-core:33135]jeg22010-11-161-30/+38
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Fixing a bug that prevented CSV from parsingjeg22010-06-251-0/+16
| | | | | | | | all multi-line fields correctly. Patch by Rob Biedenham. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/csv/test_interface.rb (test_write_hash): may need to set binary modeusa2010-05-191-5/+5
| | | | | | | when converter is specified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: Incorporating the fixes from the recentjeg22010-03-233-1/+20
| | | | | | | | FasterCSV releases: 1.5.2 and 1.5.3. [ruby-core:25038] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * A bug fix for deleting blank Table rows from Andy Hartford.jeg22010-01-311-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e