mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/csv: DifferentOFS needs to be include in each classes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c41b036f4d
commit
ef99044673
13 changed files with 23 additions and 3 deletions
|
@ -1,4 +1,6 @@
|
||||||
Sat Dec 25 22:32:45 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sat Dec 25 22:49:10 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* test/csv: DifferentOFS needs to be include in each classes.
|
||||||
|
|
||||||
* test/digest/test_digest_extend.rb (TestDigestExtend#setup):
|
* test/digest/test_digest_extend.rb (TestDigestExtend#setup):
|
||||||
should not depend on the result of previous tests
|
should not depend on the result of previous tests
|
||||||
|
|
|
@ -5,5 +5,4 @@ require "csv"
|
||||||
require_relative "../with_different_ofs.rb"
|
require_relative "../with_different_ofs.rb"
|
||||||
|
|
||||||
class TestCSV < Test::Unit::TestCase
|
class TestCSV < Test::Unit::TestCase
|
||||||
include DifferentOFS
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,6 +18,8 @@ require_relative "base"
|
||||||
# separator <tt>$/</tt>.
|
# separator <tt>$/</tt>.
|
||||||
#
|
#
|
||||||
class TestCSV::Parsing < TestCSV
|
class TestCSV::Parsing < TestCSV
|
||||||
|
include DifferentOFS
|
||||||
|
|
||||||
BIG_DATA = "123456789\n" * 1024
|
BIG_DATA = "123456789\n" * 1024
|
||||||
|
|
||||||
def test_mastering_regex_example
|
def test_mastering_regex_example
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
require_relative "base"
|
require_relative "base"
|
||||||
|
|
||||||
class TestCSV::Writing < TestCSV
|
class TestCSV::Writing < TestCSV
|
||||||
|
include DifferentOFS
|
||||||
|
|
||||||
def test_writing
|
def test_writing
|
||||||
[ ["\t", ["\t"]],
|
[ ["\t", ["\t"]],
|
||||||
["foo,\"\"\"\"\"\",baz", ["foo", "\"\"", "baz"]],
|
["foo,\"\"\"\"\"\",baz", ["foo", "\"\"", "baz"]],
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
require_relative "base"
|
require_relative "base"
|
||||||
|
|
||||||
class TestCSV::DataConverters < TestCSV
|
class TestCSV::DataConverters < TestCSV
|
||||||
|
include DifferentOFS
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
super
|
super
|
||||||
@data = "Numbers,:integer,1,:float,3.015"
|
@data = "Numbers,:integer,1,:float,3.015"
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
require_relative "base"
|
require_relative "base"
|
||||||
|
|
||||||
class TestCSV::Encodings < TestCSV
|
class TestCSV::Encodings < TestCSV
|
||||||
|
include DifferentOFS
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
super
|
super
|
||||||
require 'tempfile'
|
require 'tempfile'
|
||||||
|
|
|
@ -12,6 +12,8 @@ require "zlib"
|
||||||
require_relative "base"
|
require_relative "base"
|
||||||
|
|
||||||
class TestCSV::Features < TestCSV
|
class TestCSV::Features < TestCSV
|
||||||
|
include DifferentOFS
|
||||||
|
|
||||||
TEST_CASES = [ [%Q{a,b}, ["a", "b"]],
|
TEST_CASES = [ [%Q{a,b}, ["a", "b"]],
|
||||||
[%Q{a,"""b"""}, ["a", "\"b\""]],
|
[%Q{a,"""b"""}, ["a", "\"b\""]],
|
||||||
[%Q{a,"""b"}, ["a", "\"b"]],
|
[%Q{a,"""b"}, ["a", "\"b"]],
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
require_relative "base"
|
require_relative "base"
|
||||||
|
|
||||||
class TestCSV::Headers < TestCSV
|
class TestCSV::Headers < TestCSV
|
||||||
|
include DifferentOFS
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
super
|
super
|
||||||
@data = <<-END_CSV.gsub(/^\s+/, "")
|
@data = <<-END_CSV.gsub(/^\s+/, "")
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
require_relative "base"
|
require_relative "base"
|
||||||
|
|
||||||
class TestCSV::Interface < TestCSV
|
class TestCSV::Interface < TestCSV
|
||||||
|
include DifferentOFS
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
super
|
super
|
||||||
@path = File.join(File.dirname(__FILE__), "temp_test_data.csv")
|
@path = File.join(File.dirname(__FILE__), "temp_test_data.csv")
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
require_relative "base"
|
require_relative "base"
|
||||||
|
|
||||||
class TestCSV::Row < TestCSV
|
class TestCSV::Row < TestCSV
|
||||||
|
include DifferentOFS
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
super
|
super
|
||||||
@row = CSV::Row.new(%w{A B C A A}, [1, 2, 3, 4])
|
@row = CSV::Row.new(%w{A B C A A}, [1, 2, 3, 4])
|
||||||
|
|
|
@ -25,6 +25,7 @@ class Hash
|
||||||
end
|
end
|
||||||
|
|
||||||
class TestCSV::Serialization < TestCSV
|
class TestCSV::Serialization < TestCSV
|
||||||
|
include DifferentOFS
|
||||||
|
|
||||||
### Classes Used to Test Serialization ###
|
### Classes Used to Test Serialization ###
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
require_relative "base"
|
require_relative "base"
|
||||||
|
|
||||||
class TestCSV::Table < TestCSV
|
class TestCSV::Table < TestCSV
|
||||||
|
include DifferentOFS
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
super
|
super
|
||||||
@rows = [ CSV::Row.new(%w{A B C}, [1, 2, 3]),
|
@rows = [ CSV::Row.new(%w{A B C}, [1, 2, 3]),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'digest'
|
require 'digest'
|
||||||
require_relative '../with_diffent_ofs.rb'
|
require_relative '../with_different_ofs.rb'
|
||||||
|
|
||||||
class TestDigestExtend < Test::Unit::TestCase
|
class TestDigestExtend < Test::Unit::TestCase
|
||||||
include DifferentOFS
|
include DifferentOFS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue