test/delimited_reader_test.rb in iostreams-0.8.0 vs test/delimited_reader_test.rb in iostreams-0.8.1
- old
+ new
@@ -20,21 +20,21 @@
IOStreams::Delimited::Reader.open(@file_name) do |io|
io.each_line { |line| lines << line }
end
assert_equal @data, lines
end
-
+
should 'each_line stream' do
lines = []
File.open(@file_name) do |file|
IOStreams::Delimited::Reader.open(file) do |io|
io.each_line { |line| lines << line }
end
end
assert_equal @data, lines
end
- ["\r\n", "\n\r", "\n"].each do |delimiter|
+ ["\r\n", "\n\r", "\n", "\r"].each do |delimiter|
should "autodetect delimiter: #{delimiter.inspect}" do
lines = []
stream = StringIO.new(@data.join(delimiter))
IOStreams::Delimited::Reader.open(stream, buffer_size: 15) do |io|
io.each_line { |line| lines << line }