summaryrefslogtreecommitdiffstats
path: root/test/csv
Commit message (Collapse)AuthorAgeFilesLines
* * lib/csv.rb (IOReader, BasicWriter): call binmode when a given IOnahi2003-10-061-9/+47
| | | | | | | | | | respond_to?(:binmode). record separator was wrong when you gave text mode IO to Reader.parse and Writer.generate. * test/csv/test_csv.rb: add tests for above change. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/csv/test_csv.rb: add negative tests of row_sep.nahi2003-09-161-0/+16
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: add extra pamameter to specify row(record) separater character.nahi2003-09-152-122/+245
| | | | | | | | | | | | | | | To parse Mac's CR separated CSV, do like this. CSV.open("mac.csv", "r", ?,,?\r) { |row| p row.to_a } The 3rd parameter in this example ?, is for column separater and the 4th ?\r is for row separater. Row separater is nil by default. Nil separater means "\r\n" or "\n". * test/csv/test_csv.rb: add tests for above feature. * test/csv/mac.csv: added. Sample CR separated CSV file. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * sync to lib/csv/tests/csv_ut.rb.nahi2003-09-051-9/+7
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser#order, #permute, #parse): allow annobu2003-09-051-7/+9
| | | | | | | | | | array as argument. * test/ruby/test_*.rb: moved invariants to left side in assert_equal, and use assert_nil, assert_raises and so on. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby: tests for ruby itself.nahi2003-09-041-1/+1
| | | | | | | | | | | * test/ruby/test_*.rb: split sample/test.rb into 28 test/unit testcases. some tests could not be translates... search '!!' mark to see it. * test/csv/test_csv.rb: should require 'csv', not '../lib/csv'. test runner should set load path correctly. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/csv/test_csv.rb: close opened files for CSV::IOBuf explicitly. openednahi2003-09-041-151/+181
| | | | | | | file cannot be removed under win32 box. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/csv/test_csv.rb: use remove_const to reduce warnings. use Dir.tmpdir tonahi2003-09-042-76/+72
| | | | | | | locate working files. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/csv/test_csv.rb: run on test/unit original layer.nahi2003-09-041-42/+26
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test: add test directory. Test::Unit aware testcases and needed files shouldnahi2003-09-033-0/+1512
be located in this directory. dir/file name convention; test/{module_name}/test_{testcase_name}.rb test/{module_name}/{needed_files} someday, someone will write testrunner which searches test_*.rb and run testcases automatically * test/csv/*: add testcase for lib/csv.rb. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e