mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 13:34:17 +02:00
27 lines
490 B
Ruby
27 lines
490 B
Ruby
# -*- coding: utf-8 -*-
|
|
# frozen_string_literal: false
|
|
|
|
require_relative "../helper"
|
|
|
|
class TestCSVParseRead < Test::Unit::TestCase
|
|
extend DifferentOFS
|
|
|
|
def test_shift
|
|
data = <<-CSV
|
|
1
|
|
2
|
|
3
|
|
CSV
|
|
csv = CSV.new(data)
|
|
assert_equal([
|
|
["1"],
|
|
[["2"], ["3"]],
|
|
nil,
|
|
],
|
|
[
|
|
csv.shift,
|
|
csv.read,
|
|
csv.shift,
|
|
])
|
|
end
|
|
end
|