summaryrefslogtreecommitdiff
path: root/test/csv
diff options
context:
space:
mode:
authorKouhei Sutou <kou@clear-code.com>2019-04-17 22:02:40 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-07-14 23:07:31 +0900
commit8392592a0a33bb9103a7aa968389fe50e304e062 (patch)
treeabfbbf1cc870222be6bf5caf022e525bd4ec2506 /test/csv
parent9171f833054cd47842e12fc0fd3cc1df704a9192 (diff)
[ruby/csv] Don't raise on eof?
GitHub: fix #86 Reported by krororo. Thanks!!! https://github.com/ruby/csv/commit/5a8d9d9297
Diffstat (limited to 'test/csv')
-rw-r--r--test/csv/parse/test_invalid.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/csv/parse/test_invalid.rb b/test/csv/parse/test_invalid.rb
index b84707c..9dfd081 100644
--- a/test/csv/parse/test_invalid.rb
+++ b/test/csv/parse/test_invalid.rb
@@ -25,12 +25,15 @@ ggg,hhh,iii
csv.shift)
assert_equal(CSV::Row.new(headers, ["aaa", "bbb", "ccc"]),
csv.shift)
+ assert_equal(false, csv.eof?)
error = assert_raise(CSV::MalformedCSVError) do
csv.shift
end
assert_equal("Illegal quoting in line 3.",
error.message)
+ assert_equal(false, csv.eof?)
assert_equal(CSV::Row.new(headers, ["ggg", "hhh", "iii"]),
csv.shift)
+ assert_equal(true, csv.eof?)
end
end