~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to test/csv/test_features.rb

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2011-09-24 19:16:17 UTC
  • mfrom: (1.1.8 upstream) (13.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110924191617-o1qz4rcmqjot8zuy
Tags: 1.9.3~rc1-1
* New upstream release: 1.9.3 RC1.
  + Includes load.c fixes. Closes: #639959.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
#  Copyright 2005 James Edward Gray II. You can redistribute or modify this code
8
8
#  under the terms of Ruby's license.
9
9
 
10
 
require "test/unit"
11
10
require "zlib"
12
11
 
13
 
require "csv"
14
 
 
15
 
class TestCSVFeatures < Test::Unit::TestCase
 
12
require_relative "base"
 
13
 
 
14
class TestCSV::Features < TestCSV
 
15
  extend DifferentOFS
 
16
 
16
17
  TEST_CASES = [ [%Q{a,b},               ["a", "b"]],
17
18
                 [%Q{a,"""b"""},         ["a", "\"b\""]],
18
19
                 [%Q{a,"""b"},           ["a", "\"b"]],
32
33
                 [%Q{"\r\n,",},          ["\r\n,", nil]] ]
33
34
 
34
35
  def setup
 
36
    super
35
37
    @sample_data = <<-END_DATA.gsub(/^ +/, "")
36
38
    line,1,abc
37
39
    line,2,"def\nghi"