* test/csv/test_csv.rb: add negative tests of row_sep.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2b935b5041
commit
a59f05a455
@ -1,3 +1,7 @@
|
|||||||
|
Mon Sep 16 22:25:06 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
|
||||||
|
|
||||||
|
* test/csv/test_csv.rb: add negative tests of row_sep.
|
||||||
|
|
||||||
Tue Sep 16 16:47:56 2003 WATANABE Hirofumi <eban@ruby-lang.org>
|
Tue Sep 16 16:47:56 2003 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||||
|
|
||||||
* MANIFEST: add test/csv/mac.csv.
|
* MANIFEST: add test/csv/mac.csv.
|
||||||
|
@ -1206,6 +1206,13 @@ public
|
|||||||
end
|
end
|
||||||
assert_equal([["Avenches", "aus Umgebung"], ["Bad Hersfeld", "Ausgrabung"]], rows)
|
assert_equal([["Avenches", "aus Umgebung"], ["Bad Hersfeld", "Ausgrabung"]], rows)
|
||||||
|
|
||||||
|
rows = []
|
||||||
|
assert_raises(CSV::IllegalFormatError) do
|
||||||
|
CSV.open(@macfile, "r") do |row|
|
||||||
|
rows << row.to_a
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
rows = []
|
rows = []
|
||||||
file = File.open(@macfile)
|
file = File.open(@macfile)
|
||||||
CSV::Reader.parse(file.read, ?,, ?\r) do |row|
|
CSV::Reader.parse(file.read, ?,, ?\r) do |row|
|
||||||
@ -1213,6 +1220,15 @@ public
|
|||||||
end
|
end
|
||||||
assert_equal([["Avenches", "aus Umgebung"], ["Bad Hersfeld", "Ausgrabung"]], rows)
|
assert_equal([["Avenches", "aus Umgebung"], ["Bad Hersfeld", "Ausgrabung"]], rows)
|
||||||
file.close
|
file.close
|
||||||
|
|
||||||
|
rows = []
|
||||||
|
file = File.open(@macfile)
|
||||||
|
assert_raises(CSV::IllegalFormatError) do
|
||||||
|
CSV::Reader.parse(file.read, ?,) do |row|
|
||||||
|
rows << row.to_a
|
||||||
|
end
|
||||||
|
end
|
||||||
|
file.close
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user