summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-15 11:55:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-15 11:55:52 +0000
commit3a47cf3395dd4c4fe8bdd5df13aab698f2ca314b (patch)
treec4a278220ba8141b829c5c7b0777c1049cfe413c /test
parent39da1b63699faf30c86e753e193c29b81b16136d (diff)
* remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/dl/test_func.rb2
-rwxr-xr-xtest/json/test_json.rb2
-rwxr-xr-xtest/json/test_json_addition.rb2
-rw-r--r--test/logger/test_logger.rb2
-rw-r--r--test/minitest/test_minitest_mock.rb4
-rw-r--r--test/open-uri/test_ssl.rb18
-rw-r--r--test/openssl/test_asn1.rb4
-rw-r--r--test/openssl/test_x509cert.rb4
-rw-r--r--test/openssl/test_x509crl.rb4
-rw-r--r--test/openssl/test_x509req.rb4
-rw-r--r--test/psych/test_null.rb2
-rw-r--r--test/psych/test_struct.rb2
-rw-r--r--test/rake/in_environment.rb4
-rw-r--r--test/rake/test_application.rb30
-rw-r--r--test/rake/test_definitions.rb4
-rw-r--r--test/rake/test_earlytime.rb2
-rw-r--r--test/rake/test_extension.rb4
-rw-r--r--test/rake/test_file_task.rb2
-rw-r--r--test/rake/test_filelist.rb22
-rw-r--r--test/rake/test_fileutils.rb10
-rw-r--r--test/rake/test_multitask.rb2
-rw-r--r--test/rake/test_pathmap.rb2
-rw-r--r--test/rake/test_rake.rb2
-rw-r--r--test/rake/test_task_arguments.rb2
-rw-r--r--test/rake/test_task_manager.rb4
-rw-r--r--test/rake/test_test_task.rb2
-rw-r--r--test/rdoc/test_rdoc_context_section.rb2
-rw-r--r--test/rdoc/test_rdoc_parser_ruby.rb2
-rw-r--r--test/readline/test_readline.rb6
-rw-r--r--test/rexml/test_attributes.rb4
-rw-r--r--test/rexml/test_contrib.rb18
-rw-r--r--test/rexml/test_doctype.rb14
-rw-r--r--test/rexml/test_elements.rb12
-rw-r--r--test/rexml/test_encoding_2.rb2
-rw-r--r--test/rexml/test_entity.rb10
-rw-r--r--test/rexml/test_functions.rb2
-rw-r--r--test/rexml/test_jaxen.rb46
-rw-r--r--test/rexml/test_light.rb4
-rw-r--r--test/rexml/test_listener.rb6
-rw-r--r--test/rexml/test_notationdecl_mixin.rb6
-rw-r--r--test/rexml/test_notationdecl_parsetest.rb2
-rw-r--r--test/rexml/test_pullparser.rb10
-rw-r--r--test/rexml/test_sax.rb14
-rw-r--r--test/rexml/test_stream.rb8
-rw-r--r--test/rexml/test_validation_rng.rb6
-rw-r--r--test/rexml/test_xml_declaration_parent_child.rb6
-rw-r--r--test/rexml/test_xpath.rb106
-rw-r--r--test/rexml/test_xpath_attribute_query.rb28
-rw-r--r--test/rexml/test_xpath_pred.rb6
-rw-r--r--test/ruby/test_marshal.rb2
-rw-r--r--test/ruby/test_module.rb2
-rw-r--r--test/ruby/test_super.rb2
-rw-r--r--test/ruby/test_time.rb2
-rw-r--r--test/rubygems/test_gem_commands_unpack_command.rb14
-rw-r--r--test/rubygems/test_gem_platform.rb8
-rw-r--r--test/rubygems/test_gem_silent_ui.rb4
-rw-r--r--test/syck/test_null.rb2
-rw-r--r--test/syck/test_struct.rb2
-rw-r--r--test/syck/test_yaml.rb4
-rw-r--r--test/test_pstore.rb2
-rw-r--r--test/thread/test_queue.rb2
-rw-r--r--test/webrick/test_cookie.rb2
-rw-r--r--test/webrick/test_httprequest.rb4
-rw-r--r--test/win32ole/test_win32ole_variant.rb2
64 files changed, 258 insertions, 258 deletions
diff --git a/test/dl/test_func.rb b/test/dl/test_func.rb
index 27bf7daf7f7..45d475c9197 100644
--- a/test/dl/test_func.rb
+++ b/test/dl/test_func.rb
@@ -58,7 +58,7 @@ module DL
assert_equal("123", str.to_s)
ensure
GC.stress = stress
- end
+ end
def test_isdigit()
f = Function.new(CFunc.new(@libc['isdigit'], TYPE_INT, 'isdigit'),
diff --git a/test/json/test_json.rb b/test/json/test_json.rb
index aea50485fca..4c724fd36e2 100755
--- a/test/json/test_json.rb
+++ b/test/json/test_json.rb
@@ -154,7 +154,7 @@ class TC_JSON < Test::Unit::TestCase
assert_equal(@ary,
parse('[[1],["foo"],[3.14],[47.11e+2],[2718.0E-3],[null],[[1,-2,3]]'\
',[false],[true]]'))
- assert_equal(@ary, parse(%Q{ [ [1] , ["foo"] , [3.14] \t , [47.11e+2]
+ assert_equal(@ary, parse(%Q{ [ [1] , ["foo"] , [3.14] \t , [47.11e+2]
, [2718.0E-3 ],\r[ null] , [[1, -2, 3 ]], [false ],[ true]\n ] }))
end
diff --git a/test/json/test_json_addition.rb b/test/json/test_json_addition.rb
index 34f0a71b48b..36b89e5c35b 100755
--- a/test/json/test_json_addition.rb
+++ b/test/json/test_json_addition.rb
@@ -23,7 +23,7 @@ class TC_JSONAddition < Test::Unit::TestCase
def ==(other)
a == other.a
end
-
+
def self.json_create(object)
new(*object['args'])
end
diff --git a/test/logger/test_logger.rb b/test/logger/test_logger.rb
index 576bec519f1..0736314b1ab 100644
--- a/test/logger/test_logger.rb
+++ b/test/logger/test_logger.rb
@@ -498,7 +498,7 @@ class TestLoggerApplication < Test::Unit::TestCase
@app.set_log(@filename)
begin
@app.level = Logger::UNKNOWN
- @app.start # logs FATAL log
+ @app.start # logs FATAL log
assert_equal(1, File.read(@filename).split(/\n/).size)
ensure
@app.logger.close
diff --git a/test/minitest/test_minitest_mock.rb b/test/minitest/test_minitest_mock.rb
index 311f5fa7fb5..5d0bae8ad72 100644
--- a/test/minitest/test_minitest_mock.rb
+++ b/test/minitest/test_minitest_mock.rb
@@ -89,10 +89,10 @@ class TestMiniTestMock < MiniTest::Unit::TestCase
def test_assign_per_mock_return_values
a = MiniTest::Mock.new
b = MiniTest::Mock.new
-
+
a.expect(:foo, :a)
b.expect(:foo, :b)
-
+
assert_equal :a, a.foo
assert_equal :b, b.foo
end
diff --git a/test/open-uri/test_ssl.rb b/test/open-uri/test_ssl.rb
index 0502f76346c..64fc214ce5a 100644
--- a/test/open-uri/test_ssl.rb
+++ b/test/open-uri/test_ssl.rb
@@ -143,13 +143,13 @@ Certificate:
36:c1:44:4e:ab:9a:b2:73:6d
Exponent: 65537 (0x10001)
X509v3 extensions:
- X509v3 Basic Constraints:
+ X509v3 Basic Constraints:
CA:FALSE
- Netscape Comment:
+ Netscape Comment:
OpenSSL Generated Certificate
- X509v3 Subject Key Identifier:
+ X509v3 Subject Key Identifier:
24:6F:03:A3:EE:06:51:75:B2:BA:FC:3A:38:59:BF:ED:87:CD:E8:7F
- X509v3 Authority Key Identifier:
+ X509v3 Authority Key Identifier:
keyid:24:6F:03:A3:EE:06:51:75:B2:BA:FC:3A:38:59:BF:ED:87:CD:E8:7F
Signature Algorithm: sha1WithRSAEncryption
@@ -205,15 +205,15 @@ Certificate:
f0:86:61:ce:f1:ff:42:c7:23
Exponent: 65537 (0x10001)
X509v3 extensions:
- X509v3 Basic Constraints:
+ X509v3 Basic Constraints:
CA:FALSE
- Netscape Cert Type:
+ Netscape Cert Type:
SSL Server
- Netscape Comment:
+ Netscape Comment:
OpenSSL Generated Certificate
- X509v3 Subject Key Identifier:
+ X509v3 Subject Key Identifier:
7F:17:5A:58:88:96:E1:1F:44:EA:FF:AD:C6:2E:90:E2:95:32:DD:F0
- X509v3 Authority Key Identifier:
+ X509v3 Authority Key Identifier:
keyid:24:6F:03:A3:EE:06:51:75:B2:BA:FC:3A:38:59:BF:ED:87:CD:E8:7F
Signature Algorithm: sha1WithRSAEncryption
diff --git a/test/openssl/test_asn1.rb b/test/openssl/test_asn1.rb
index 4fd4771d7b2..62d0eb476d0 100644
--- a/test/openssl/test_asn1.rb
+++ b/test/openssl/test_asn1.rb
@@ -429,7 +429,7 @@ class OpenSSL::TestASN1 < Test::Unit::TestCase
assert_equal(raw, OpenSSL::ASN1.decode(raw).to_der)
end
end
-
+
def test_primitive_inf_length
assert_raises(OpenSSL::ASN1::ASN1Error) do
spec = %w{ 02 80 02 01 01 00 00 }
@@ -438,6 +438,6 @@ class OpenSSL::TestASN1 < Test::Unit::TestCase
OpenSSL::ASN1.decode_all(raw)
end
end
-
+
end if defined?(OpenSSL)
diff --git a/test/openssl/test_x509cert.rb b/test/openssl/test_x509cert.rb
index 786eebb3688..6d39c9690dd 100644
--- a/test/openssl/test_x509cert.rb
+++ b/test/openssl/test_x509cert.rb
@@ -170,9 +170,9 @@ class OpenSSL::TestX509Certificate < Test::Unit::TestCase
nil, nil, OpenSSL::Digest::MD5.new)
}
end
-
+
private
-
+
def certificate_error_returns_false
yield
rescue OpenSSL::X509::CertificateError
diff --git a/test/openssl/test_x509crl.rb b/test/openssl/test_x509crl.rb
index c0c996e9668..56508e0a123 100644
--- a/test/openssl/test_x509crl.rb
+++ b/test/openssl/test_x509crl.rb
@@ -208,9 +208,9 @@ class OpenSSL::TestX509CRL < Test::Unit::TestCase
crl.version = 0
assert_equal(false, crl.verify(@dsa512))
end
-
+
private
-
+
def crl_error_returns_false
yield
rescue OpenSSL::X509::CRLError
diff --git a/test/openssl/test_x509req.rb b/test/openssl/test_x509req.rb
index 1b660ca051a..882a1d7356a 100644
--- a/test/openssl/test_x509req.rb
+++ b/test/openssl/test_x509req.rb
@@ -137,9 +137,9 @@ class OpenSSL::TestX509Request < Test::Unit::TestCase
assert_raise(OpenSSL::X509::RequestError){
issue_csr(0, @dn, @dsa512, OpenSSL::Digest::MD5.new) }
end
-
+
private
-
+
def request_error_returns_false
yield
rescue OpenSSL::X509::RequestError
diff --git a/test/psych/test_null.rb b/test/psych/test_null.rb
index 1ebf6444c20..0fee1d24640 100644
--- a/test/psych/test_null.rb
+++ b/test/psych/test_null.rb
@@ -10,7 +10,7 @@ module Psych
---
- ~
- null
--
+-
- Null
- NULL
eoyml
diff --git a/test/psych/test_struct.rb b/test/psych/test_struct.rb
index 42c4e113ab2..39e38f7dfd9 100644
--- a/test/psych/test_struct.rb
+++ b/test/psych/test_struct.rb
@@ -39,7 +39,7 @@ module Psych
def test_load
obj = Psych.load(<<-eoyml)
---- !ruby/struct:PsychStructWithIvar
+--- !ruby/struct:PsychStructWithIvar
:foo: bar
:@bar: hello
eoyml
diff --git a/test/rake/in_environment.rb b/test/rake/in_environment.rb
index f0a340fac9a..f6fd8fb7311 100644
--- a/test/rake/in_environment.rb
+++ b/test/rake/in_environment.rb
@@ -1,11 +1,11 @@
module InEnvironment
private
-
+
# Create an environment for a test. At the completion of the yielded
# block, the environment is restored to its original conditions.
def in_environment(settings)
original_settings = set_env(settings)
- yield
+ yield
ensure
set_env(original_settings) if original_settings
end
diff --git a/test/rake/test_application.rb b/test/rake/test_application.rb
index 9158689e655..27c7d8df057 100644
--- a/test/rake/test_application.rb
+++ b/test/rake/test_application.rb
@@ -123,7 +123,7 @@ class Rake::TestApplication < Test::Unit::TestCase
def test_load_rakefile
in_environment("PWD" => File.join(BASEDIR, "data/unittest")) do
- @app.instance_eval do
+ @app.instance_eval do
handle_options
options.silent = true
load_rakefile
@@ -151,8 +151,8 @@ class Rake::TestApplication < Test::Unit::TestCase
handle_options
options.silent = true
end
- ex = assert_raise(RuntimeError) do
- @app.instance_eval do raw_load_rakefile end
+ ex = assert_raise(RuntimeError) do
+ @app.instance_eval do raw_load_rakefile end
end
assert_match(/no rakefile found/i, ex.message)
end
@@ -313,7 +313,7 @@ class Rake::TestApplicationOptions < Test::Unit::TestCase
RakeFileUtils.verbose_flag = false
RakeFileUtils.nowrite_flag = false
end
-
+
def clear_argv
while ! ARGV.empty?
ARGV.pop
@@ -519,7 +519,7 @@ class Rake::TestApplicationOptions < Test::Unit::TestCase
assert_equal :exit, @exit
end
end
-
+
def test_classic_namespace
flags(['--classic-namespace'], ['-C', '-T', '-P', '-n', '-s', '-t']) do |opts|
assert opts.classic_namespace
@@ -534,7 +534,7 @@ class Rake::TestApplicationOptions < Test::Unit::TestCase
def test_bad_option
capture_stderr do
ex = assert_raise(OptionParser::InvalidOption) do
- flags('--bad-option')
+ flags('--bad-option')
end
if ex.message =~ /^While/ # Ruby 1.9 error message
assert_match(/while parsing/i, ex.message)
@@ -549,12 +549,12 @@ class Rake::TestApplicationOptions < Test::Unit::TestCase
command_line("a", "b")
assert_equal ["a", "b"], @tasks.sort
end
-
+
def test_default_task_collection
command_line()
assert_equal ["default"], @tasks
end
-
+
def test_environment_definition
ENV.delete('TESTKEY')
command_line("a", "TESTKEY=12")
@@ -562,12 +562,12 @@ class Rake::TestApplicationOptions < Test::Unit::TestCase
assert '12', ENV['TESTKEY']
end
- private
+ private
def flags(*sets)
sets.each do |set|
ARGV.clear
- @out = capture_stdout {
+ @out = capture_stdout {
@exit = catch(:system_exit) { opts = command_line(*set) }
}
yield(@app.options) if block_given?
@@ -593,31 +593,31 @@ class Rake::TestTaskArgumentParsing < Test::Unit::TestCase
def setup
@app = Rake::Application.new
end
-
+
def test_name_only
name, args = @app.parse_task_string("name")
assert_equal "name", name
assert_equal [], args
end
-
+
def test_empty_args
name, args = @app.parse_task_string("name[]")
assert_equal "name", name
assert_equal [], args
end
-
+
def test_one_argument
name, args = @app.parse_task_string("name[one]")
assert_equal "name", name
assert_equal ["one"], args
end
-
+
def test_two_arguments
name, args = @app.parse_task_string("name[one,two]")
assert_equal "name", name
assert_equal ["one", "two"], args
end
-
+
def test_can_handle_spaces_between_args
name, args = @app.parse_task_string("name[one, two,\tthree , \tfour]")
assert_equal "name", name
diff --git a/test/rake/test_definitions.rb b/test/rake/test_definitions.rb
index 164958ecd51..a5440dcadca 100644
--- a/test/rake/test_definitions.rb
+++ b/test/rake/test_definitions.rb
@@ -6,7 +6,7 @@ require_relative 'filecreation'
######################################################################
class Rake::TestDefinitions < Test::Unit::TestCase
include Rake
-
+
EXISTINGFILE = "testdata/existing"
def setup
@@ -78,4 +78,4 @@ class Rake::TestDefinitions < Test::Unit::TestCase
end
end
-
+
diff --git a/test/rake/test_earlytime.rb b/test/rake/test_earlytime.rb
index a2281466794..d94523cffd6 100644
--- a/test/rake/test_earlytime.rb
+++ b/test/rake/test_earlytime.rb
@@ -24,7 +24,7 @@ class Rake::TestEarlyTime < Test::Unit::TestCase
assert t1 < t2
assert t2 > t1
assert t1 == t1
- assert t2 == t2
+ assert t2 == t2
end
def test_to_s
diff --git a/test/rake/test_extension.rb b/test/rake/test_extension.rb
index 94348aafa62..3b10a4c6edb 100644
--- a/test/rake/test_extension.rb
+++ b/test/rake/test_extension.rb
@@ -16,14 +16,14 @@ class Rake::TestExtension < Test::Unit::TestCase
$stderr = old_err
end
end
-
+
class Sample
extend Redirect
def duplicate_method
:original
end
-
+
OK_ERRS = error_redirect do
rake_extension("a") do
def ok_method
diff --git a/test/rake/test_file_task.rb b/test/rake/test_file_task.rb
index 0232ac95ed1..132bd888535 100644
--- a/test/rake/test_file_task.rb
+++ b/test/rake/test_file_task.rb
@@ -77,7 +77,7 @@ class Rake::TestFileTask < Test::Unit::TestCase
# deleting the file target on failure is always the proper thing to
# do. I'm willing to hear input on this topic.
def ztest_file_deletes_on_failure
- task :obj
+ task :obj
file NEWFILE => [:obj] do |t|
FileUtils.touch NEWFILE
fail "Ooops"
diff --git a/test/rake/test_filelist.rb b/test/rake/test_filelist.rb
index 08456a4da86..2b1ad442374 100644
--- a/test/rake/test_filelist.rb
+++ b/test/rake/test_filelist.rb
@@ -89,7 +89,7 @@ class Rake::TestFileList < Test::Unit::TestCase
h = f.include("y")
assert_equal f.object_id, h.object_id
end
-
+
def test_match
fl = FileList.new
fl.include(File.expand_path('../test*.rb', __FILE__))
@@ -155,7 +155,7 @@ class Rake::TestFileList < Test::Unit::TestCase
fl.exclude('testdata/existing')
assert_equal [], fl
end
-
+
def test_excluding_via_block
fl = FileList['testdata/a.c', 'testdata/b.c', 'testdata/xyz.c']
fl.exclude { |fn| fn.pathmap('%n') == 'xyz' }
@@ -235,24 +235,24 @@ class Rake::TestFileList < Test::Unit::TestCase
assert_equal ["testdata/abc.o", "testdata/x.o", "testdata/xyz.o"].sort,
f3.sort
end
-
+
def test_claim_to_be_a_kind_of_array
fl = FileList['testdata/*.c']
assert fl.is_a?(Array)
assert fl.kind_of?(Array)
end
-
+
def test_claim_to_be_a_kind_of_filelist
fl = FileList['testdata/*.c']
assert fl.is_a?(FileList)
assert fl.kind_of?(FileList)
end
-
+
def test_claim_to_be_a_filelist_instance
fl = FileList['testdata/*.c']
assert fl.instance_of?(FileList)
end
-
+
def test_dont_claim_to_be_an_array_instance
fl = FileList['testdata/*.c']
assert ! fl.instance_of?(Array)
@@ -590,12 +590,12 @@ class Rake::TestFileList < Test::Unit::TestCase
assert_equal ['b', 'd'], r
assert_equal FileList, r.class
end
-
+
def test_file_utils_can_use_filelists
cfiles = FileList['testdata/*.c']
-
+
cp cfiles, @cdir, :verbose => false
-
+
assert File.exist?(File.join(@cdir, 'abc.c'))
assert File.exist?(File.join(@cdir, 'xyz.c'))
assert File.exist?(File.join(@cdir, 'x.c'))
@@ -603,7 +603,7 @@ class Rake::TestFileList < Test::Unit::TestCase
def create_test_data
verbose(false) do
-
+
mkdir "testdata" unless File.exist? "testdata"
mkdir "testdata/CVS" rescue nil
mkdir "testdata/.svn" rescue nil
@@ -621,5 +621,5 @@ class Rake::TestFileList < Test::Unit::TestCase
touch "testdata/existing"
end
end
-
+
end
diff --git a/test/rake/test_fileutils.rb b/test/rake/test_fileutils.rb
index 1664ec80c3d..b6106c0978f 100644
--- a/test/rake/test_fileutils.rb
+++ b/test/rake/test_fileutils.rb
@@ -18,7 +18,7 @@ class Rake::TestFileUtils < Test::Unit::TestCase
@oldruby = nil
end
end
-
+
def teardown
FileUtils.rm_rf("testdata")
FileUtils::LN_SUPPORTED[0] = true
@@ -28,7 +28,7 @@ class Rake::TestFileUtils < Test::Unit::TestCase
FileUtils.class_eval {const_set(:RUBY, ruby)}
end
end
-
+
def test_rm_one_file
create_file("testdata/a")
FileUtils.rm_rf "testdata/a"
@@ -165,7 +165,7 @@ class Rake::TestFileUtils < Test::Unit::TestCase
end
def test_sh_failure
- assert_raise(RuntimeError) {
+ assert_raise(RuntimeError) {
verbose(false) { Sh.run "#{RUBY} #{File.expand_path('../shellcommand.rb', __FILE__)} 1" }
}
end
@@ -241,7 +241,7 @@ class Rake::TestFileUtils < Test::Unit::TestCase
end
private
-
+
def redirect_stderr
old_err = $stderr
$stderr = StringIO.new
@@ -258,5 +258,5 @@ class Rake::TestFileUtils < Test::Unit::TestCase
def env_var
windows? ? '%RAKE_TEST_SH%' : '$RAKE_TEST_SH'
end
-
+
end
diff --git a/test/rake/test_multitask.rb b/test/rake/test_multitask.rb
index 9711e7e77ec..0413d03db30 100644
--- a/test/rake/test_multitask.rb
+++ b/test/rake/test_multitask.rb
@@ -40,4 +40,4 @@ class Rake::TestMultiTask < Test::Unit::TestCase
end
end
-
+
diff --git a/test/rake/test_pathmap.rb b/test/rake/test_pathmap.rb
index 257529ab87b..2775b910398 100644
--- a/test/rake/test_pathmap.rb
+++ b/test/rake/test_pathmap.rb
@@ -23,7 +23,7 @@ class Rake::TestPathMap < Test::Unit::TestCase
def test_n_returns_basename_without_extension
assert_equal "abc", "abc.rb".pathmap("%n")
- assert_equal "abc", "abc".pathmap("%n")
+ assert_equal "abc", "abc".pathmap("%n")
assert_equal "abc", "this/is/a/dir/abc.rb".pathmap("%n")
assert_equal "abc", "/this/is/a/dir/abc.rb".pathmap("%n")
assert_equal "abc", "/this/is/a/dir/abc".pathmap("%n")
diff --git a/test/rake/test_rake.rb b/test/rake/test_rake.rb
index 52230fe148e..44fecee5591 100644
--- a/test/rake/test_rake.rb
+++ b/test/rake/test_rake.rb
@@ -35,5 +35,5 @@ class Rake::TestRake < Test::Unit::TestCase
def test_original_dir_reports_current_dir
assert_equal Dir.pwd, Rake.original_dir
end
-
+
end
diff --git a/test/rake/test_task_arguments.rb b/test/rake/test_task_arguments.rb
index d40144f3fdd..9e907aed7d2 100644
--- a/test/rake/test_task_arguments.rb
+++ b/test/rake/test_task_arguments.rb
@@ -76,7 +76,7 @@ class Rake::TestTaskArguments < Test::Unit::TestCase
child = Rake::TaskArguments.new(['aa'], [2], parent)
assert_equal 2, child.aa
end
-
+
def test_default_arguments_values_can_be_merged
ta = Rake::TaskArguments.new(["aa", "bb"], [nil, "original_val"])
ta.with_defaults({ :aa => 'default_val' })
diff --git a/test/rake/test_task_manager.rb b/test/rake/test_task_manager.rb
index 1e92e25fbf5..3ab039ca856 100644
--- a/test/rake/test_task_manager.rb
+++ b/test/rake/test_task_manager.rb
@@ -135,7 +135,7 @@ class Rake::TestTaskManager < Test::Unit::TestCase
end
end
assert_equal t1, @tm[:t, []]
- assert_equal t2, @tm[:t, ["a"]]
+ assert_equal t2, @tm[:t, ["a"]]
assert_equal t3, @tm[:t, ["a", "b"]]
assert_equal s, @tm[:s, ["a", "b"]]
assert_equal s, @tm[:s, ["a"]]
@@ -153,7 +153,7 @@ class Rake::TestTaskManager < Test::Unit::TestCase
@tm["a:x"].invoke
assert_equal ["next z"], values
end
-
+
end
class Rake::TestTaskManagerArgumentResolution < Test::Unit::TestCase
diff --git a/test/rake/test_test_task.rb b/test/rake/test_test_task.rb
index a0dc7a0717f..0b7dbc625b8 100644
--- a/test/rake/test_test_task.rb
+++ b/test/rake/test_test_task.rb
@@ -4,7 +4,7 @@ require 'rake/testtask'
class Rake::TestTestTask < Test::Unit::TestCase
include Rake
-
+
def setup
@oldwd = Dir.pwd
@tmpwd = Dir.mktmpdir
diff --git a/test/rdoc/test_rdoc_context_section.rb b/test/rdoc/test_rdoc_context_section.rb
index 1636c982466..d37a4d222e1 100644
--- a/test/rdoc/test_rdoc_context_section.rb
+++ b/test/rdoc/test_rdoc_context_section.rb
@@ -5,7 +5,7 @@ require 'rdoc'
require 'rdoc/code_objects'
class TestRDocContextSection < MiniTest::Unit::TestCase
-
+
def setup
@S = RDoc::Context::Section
@s = @S.new nil, 'section', '# comment'
diff --git a/test/rdoc/test_rdoc_parser_ruby.rb b/test/rdoc/test_rdoc_parser_ruby.rb
index 6c2b445ef30..87ac45a0733 100644
--- a/test/rdoc/test_rdoc_parser_ruby.rb
+++ b/test/rdoc/test_rdoc_parser_ruby.rb
@@ -2067,7 +2067,7 @@ end
foo = @top_level.classes.first
- assert_equal "= DESCRIPTION\n\nThis is a simple test class\n\n= RUMPUS\n\nIs a silly word",
+ assert_equal "= DESCRIPTION\n\nThis is a simple test class\n\n= RUMPUS\n\nIs a silly word",
foo.comment
m = foo.method_list.first
diff --git a/test/readline/test_readline.rb b/test/readline/test_readline.rb
index fc1e7194627..a504fa5e2f8 100644
--- a/test/readline/test_readline.rb
+++ b/test/readline/test_readline.rb
@@ -118,8 +118,8 @@ class TestReadline < Test::Unit::TestCase
stdin.close(true)
stdout.close(true)
end
- end
-
+ end
+
# line_buffer
# point
def test_line_buffer__point
@@ -129,7 +129,7 @@ class TestReadline < Test::Unit::TestCase
rescue NotImplementedError
return
end
-
+
stdin = Tempfile.new("test_readline_stdin")
stdout = Tempfile.new("test_readline_stdout")
begin
diff --git a/test/rexml/test_attributes.rb b/test/rexml/test_attributes.rb
index 51a7774b0f3..e46850de3a4 100644
--- a/test/rexml/test_attributes.rb
+++ b/test/rexml/test_attributes.rb
@@ -91,10 +91,10 @@ class AttributesTester < Test::Unit::TestCase
# Submitted by Kou
def test_namespace_conflict
- assert_raise( ParseException,
+ assert_raise( ParseException,
"Declaring two attributes with the same namespace should be an error" ) do
REXML::Document.new <<-XML
- <x xmlns:n1="http://www.w3.org"
+ <x xmlns:n1="http://www.w3.org"
xmlns:n2="http://www.w3.org" >
<bad n1:a="1" n2:a="2" />
</x>
diff --git a/test/rexml/test_contrib.rb b/test/rexml/test_contrib.rb
index eb16b8946c1..7d00202c95b 100644
--- a/test/rexml/test_contrib.rb
+++ b/test/rexml/test_contrib.rb
@@ -92,7 +92,7 @@ DELIMITER
doc = REXML::Document.new source
assert_equal "myprog-config", doc.root.name
count = 0
- REXML::XPath.each(doc, "x:myprog-config/x:main/x:parameter",
+ REXML::XPath.each(doc, "x:myprog-config/x:main/x:parameter",
{"x"=>"http://someurl/program/version"}) { |element|
assert_equal "name", element.attributes["name"]
count += 1;
@@ -183,7 +183,7 @@ DELIMITER
result = XPath.first(doc, xpath)
assert_equal desired_result.to_s, result.to_s
end
-
+
def test_xpath_whitespace_TobiasReif
# same as above, with whitespace in XPath
doc = Document.new(XML_STRING_01.dup)
@@ -193,7 +193,7 @@ DELIMITER
failure_message = "\n[[[TR: AFAIK, whitespace should be allowed]]]\n"
assert_equal(desired_result.to_s, result.to_s, failure_message)
end
-
+
def test_xpath_02_TobiasReif
doc = Document.new XML_STRING_01.dup
desired_result = Document.new '<author>Thomas, David; Hunt, Andrew</author>'
@@ -211,7 +211,7 @@ DELIMITER
failure_message = "\nHow to handle the apos inside the string inside the XPath?\nXPath = #{xpath}\n"
assert_equal desired_result.to_s, result.to_s, failure_message
end
-
+
def test_xpath_03_TobiasReif
doc = Document.new XML_STRING_02.dup
desired_result_string = "<entry type='Book'>
@@ -303,7 +303,7 @@ EOF
assert_nil XPath.first(doc,'//leg')
assert_equal 'http://www.foo.com/human', doc.root.elements[1].namespace
- assert_equal 'human leg',
+ assert_equal 'human leg',
XPath.first(doc, '//x:leg/text()', {'x'=>'http://www.foo.com/human'}).to_s
end
@@ -312,8 +312,8 @@ EOF
source = File.new(fixture_path('ProductionSupport.xml'))
h = Hash.new
doc = REXML::Document.new source
- doc.elements.each("//CommonError") { |el|
- h[el.elements['Key'].text] = 'okay'
+ doc.elements.each("//CommonError") { |el|
+ h[el.elements['Key'].text] = 'okay'
}
assert(h.include?('MotorInsuranceContract(Object)>>#error:'))
end
@@ -426,7 +426,7 @@ EOF
assert text !~ /&rbconfig/, "'#{text}' failed"
end
- #Error occurred in test_package_file_opens(TC_PackageInstall):
+ #Error occurred in test_package_file_opens(TC_PackageInstall):
# ArgumentError:
#illegal access mode &rbconfig.prefix;/lib/rexml
#
@@ -464,7 +464,7 @@ EOL
end
end
- def test_maintain_dtd
+ def test_maintain_dtd
src = %q{<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ivattacks SYSTEM "../../ivacm.dtd" [
<!ENTITY % extern-packages SYSTEM "../../ivpackages.dtd">
diff --git a/test/rexml/test_doctype.rb b/test/rexml/test_doctype.rb
index 20603f5378a..0a87c0a3042 100644
--- a/test/rexml/test_doctype.rb
+++ b/test/rexml/test_doctype.rb
@@ -18,7 +18,7 @@ class TestDocTypeAccessor < Test::Unit::TestCase
<r/>
XMLEND
@doctype1 = REXML::Document.new(document_string1).doctype
-
+
@pubid = "TEST_ID"
document_string2 = <<-"XMLEND"
<!DOCTYPE r PUBLIC "#{@pubid}">
@@ -31,15 +31,15 @@ class TestDocTypeAccessor < Test::Unit::TestCase
<r/>
XMLEND
@doctype3 = REXML::Document.new(document_string3).doctype
-
+
end
-
+
def test_public
assert_equal(nil, @doctype1.public)
assert_equal(@pubid, @doctype2.public)
assert_equal(@pubid, @doctype3.public)
end
-
+
def test_system
assert_equal(@sysid, @doctype1.system)
assert_equal(nil, @doctype2.system)
@@ -50,20 +50,20 @@ class TestDocTypeAccessor < Test::Unit::TestCase
assert_equal(@notid1, @doctype1.notation("n1").system)
assert_equal(@notid2, @doctype1.notation("n2").system)
end
-
+
def test_notations
notations = @doctype1.notations
assert_equal(2, notations.length)
assert_equal(@notid1, find_notation(notations, "n1").system)
assert_equal(@notid2, find_notation(notations, "n2").system)
end
-
+
def find_notation(notations, name)
notations.find { |notation|
name == notation.name
}
end
-
+
end
class TestNotationDeclPublic < Test::Unit::TestCase
diff --git a/test/rexml/test_elements.rb b/test/rexml/test_elements.rb
index 210004a1c0b..424b2a2c9b0 100644
--- a/test/rexml/test_elements.rb
+++ b/test/rexml/test_elements.rb
@@ -19,16 +19,16 @@ class ElementsTester < Test::Unit::TestCase
doc.root.elements['c'] = Element.new('d')
assert_equal 'd', doc.root.elements[1].name
end
-
+
def test_elements_delete
doc = Document.new '<a><b/><c/><c id="1"/></a>'
- block = proc { |str|
+ block = proc { |str|
out = ''
doc.write out
- assert_equal str, out
+ assert_equal str, out
}
b = doc.root.elements[1]
- doc.root.elements.delete b
+ doc.root.elements.delete b
block.call( "<a><c/><c id='1'/></a>" )
doc.elements.delete("a/c[@id='1']")
block.call( '<a><c/></a>' )
@@ -90,13 +90,13 @@ class ElementsTester < Test::Unit::TestCase
assert_equal 2, doc.root.elements.to_a("child::node()").size
assert_equal 4, XPath.match(doc.root, "child::node()").size
end
-
+
def test_elements_collect
doc = Document.new( "<a><b id='1'/><b id='2'/></a>" )
r = doc.elements.collect( "/a/b" ) { |e| e.attributes["id"].to_i }
assert_equal( [1,2], r )
end
-
+
def test_elements_inject
doc = Document.new( "<a><b id='1'/><b id='2'/></a>" )
r = doc.elements.inject( "/a/b", 3 ) { |s, e|
diff --git a/test/rexml/test_encoding_2.rb b/test/rexml/test_encoding_2.rb
index 2e845b58a08..6a985f38979 100644
--- a/test/rexml/test_encoding_2.rb
+++ b/test/rexml/test_encoding_2.rb
@@ -44,7 +44,7 @@ END
end
end
- if broken_encodings > 0
+ if broken_encodings > 0
fail "There were #{broken_encodings} encoding failures out of #{UnixCharsets.size} plus some REXML internal encodings"
else
fail "There were no encoding failures"
diff --git a/test/rexml/test_entity.rb b/test/rexml/test_entity.rb
index 5219004a49c..e6d6f290077 100644
--- a/test/rexml/test_entity.rb
+++ b/test/rexml/test_entity.rb
@@ -10,23 +10,23 @@ class EntityTester < Test::Unit::TestCase
simple =~ /#{REXML::Entity::GEDECL}/
assert $&
assert_equal simple, $&
-
+
REXML::Entity::ENTITYDECL =~ simple
assert REXML::Entity::matches?(simple)
match = REXML::Entity::ENTITYDECL.match(simple)
assert_equal 'foo', match[1]
assert_equal "'bar'", match[2]
- simple = '<!ENTITY Pub-Status
+ simple = '<!ENTITY Pub-Status
"This is a pre-release of the specification.">'
assert REXML::Entity::matches?(simple)
match = REXML::Entity::ENTITYDECL.match(simple)
assert_equal 'Pub-Status', match[1]
assert_equal '"This is a pre-release of the specification."', match[2]
- txt = '"This is a
+ txt = '"This is a
pre-release of <the> specification."'
- simple = "<!ENTITY Pub-Status
+ simple = "<!ENTITY Pub-Status
#{txt}>"
assert REXML::Entity::matches?(simple)
match = REXML::Entity::ENTITYDECL.match(simple)
@@ -117,7 +117,7 @@ class EntityTester < Test::Unit::TestCase
source = '<!DOCTYPE foo [
<!ENTITY ent "replace">
]><a>replace &ent;</a>'
- doc = REXML::Document.new( source )
+ doc = REXML::Document.new( source )
assert_equal(source, doc.to_s)
assert_equal("replace replace", doc.root.text)
assert_equal(source, doc.to_s)
diff --git a/test/rexml/test_functions.rb b/test/rexml/test_functions.rb
index e0f8a67fc10..082d772e23f 100644
--- a/test/rexml/test_functions.rb
+++ b/test/rexml/test_functions.rb
@@ -155,7 +155,7 @@ class FunctionsTester < Test::Unit::TestCase
id_1 = doc.elements["/a/b[@id='1']"]
id_2 = doc.elements["/a/b[@id='2']"]
id_3 = doc.elements["/a/b[@id='3']"]
-
+
good = {
"floor" => [[], [id_1], [id_2], [id_3]],
"ceiling" => [[id_1], [id_2], [id_3], []],
diff --git a/test/rexml/test_jaxen.rb b/test/rexml/test_jaxen.rb
index 1870928438e..222cf79c60d 100644
--- a/test/rexml/test_jaxen.rb
+++ b/test/rexml/test_jaxen.rb
@@ -41,18 +41,18 @@ class JaxenTester < Test::Unit::TestCase
file = File.new(fixture_path(fname+".xml"))
doc = Document.new( file )
XPath.each( doc, "/tests/document" ) {|e| handleDocument(e)}
-# end
+# end
# }
end
- # processes a tests/document/context node
+ # processes a tests/document/context node
def handleContext( testDoc, ctxElement)
testCtx = XPath.match( testDoc, ctxElement.attributes["select"] )[0]
- namespaces = {}
+ namespaces = {}
if testCtx.class == Element
- testCtx.prefixes.each { |pre| handleNamespace( testCtx, pre, namespaces ) }
+ testCtx.prefixes.each { |pre| handleNamespace( testCtx, pre, namespaces ) }
end
- variables = {}
+ variables = {}
XPath.each( ctxElement, "@*[namespace-uri() = 'http://jaxen.org/test-harness/var']") { |attrib| handleVariable(testCtx, variables, attrib) }
XPath.each( ctxElement, "valueOf") { |e| handleValueOf(testCtx, variables, namespaces, e) }
XPath.each( ctxElement, "test[not(@exception) or (@exception != 'true') ]") { |e| handleNominalTest(testCtx,variables, namespaces, e) }
@@ -61,7 +61,7 @@ class JaxenTester < Test::Unit::TestCase
# processes a tests/document/context/valueOf or tests/document/context/test/valueOf node
def handleValueOf(ctx,variables, namespaces, valueOfElement)
- expected = valueOfElement.text
+ expected = valueOfElement.text
got = XPath.match( ctx, valueOfElement.attributes["select"], namespaces, variables )[0]
assert_true( (got.nil? && expected.nil?) || !got.nil? )
case got.class
@@ -71,10 +71,10 @@ class JaxenTester < Test::Unit::TestCase
assert_equal( expected, got.to_s )
when Instruction
assert_equal( expected, got.content )
- when Fixnum
+ when Fixnum
assert_equal( exected.to_f, got )
when String
- # normalize values for comparison
+ # normalize values for comparison
got = "" if got == nil or got == ""
expected = "" if expected == nil or expected == ""
assert_equal( expected, got )
@@ -82,45 +82,45 @@ class JaxenTester < Test::Unit::TestCase
assert_fail( "Wassup?" )
end
end
-
-
+
+
# processes a tests/document/context/test node ( where @exception is false or doesn't exist )
def handleNominalTest(ctx, variables, namespaces, testElement)
- expected = testElement.attributes["count"]
+ expected = testElement.attributes["count"]
got = XPath.match( ctx, testElement.attributes["select"], namespaces, variables )
# might be a test with no count attribute, but nested valueOf elements
assert( expected == got.size.to_s ) if !expected.nil?
-
- XPath.each( testElement, "valueOf") { |e|
- handleValueOf(got, variables, namespaces, e)
+
+ XPath.each( testElement, "valueOf") { |e|
+ handleValueOf(got, variables, namespaces, e)
}
end
-
- # processes a tests/document/context/test node ( where @exception is true )
+
+ # processes a tests/document/context/test node ( where @exception is true )
def handleExceptionalTest(ctx, variables, namespaces, testElement)
assert_raise( Exception ) {
XPath.match( ctx, testElement.attributes["select"], namespaces, variables )
}
end
- # processes a tests/document node
+ # processes a tests/document node
def handleDocument(docElement)
puts "- Processing document: #{docElement.attributes['url']}"
testFile = File.new( docElement.attributes["url"] )
testDoc = Document.new testFile
XPath.each( docElement, "context") { |e| handleContext(testDoc, e) }
end
-
- # processes a variable definition in a namespace like <test var:foo="bar">
+
+ # processes a variable definition in a namespace like <test var:foo="bar">
def handleVariable( ctx, variables, attrib )
puts "--- Found attribute: #{attrib.name}"
variables[attrib.name] = attrib.value
end
-
- # processes a namespace definition like <test xmlns:foo="fiz:bang:bam">
+
+ # processes a namespace definition like <test xmlns:foo="fiz:bang:bam">
def handleNamespace( ctx, prefix, namespaces )
puts "--- Found namespace: #{prefix}"
- namespaces[prefix] = ctx.namespaces[prefix]
+ namespaces[prefix] = ctx.namespaces[prefix]
end
-
+
end
diff --git a/test/rexml/test_light.rb b/test/rexml/test_light.rb
index 3b9e8adfece..1b56159254c 100644
--- a/test/rexml/test_light.rb
+++ b/test/rexml/test_light.rb
@@ -12,7 +12,7 @@ class LightTester < Test::Unit::TestCase
tag, content = parser.parse
assert_equal([:document, :text], [tag, content.first])
end
-
+
# FIXME INCOMPLETE
# This is because the light API is not yet ready to be used to produce
# trees.
@@ -22,7 +22,7 @@ class LightTester < Test::Unit::TestCase
foo = doc.add_element( 'foo' )
assert_equal( "foo", foo.name )
end
-
+
def test_add_attribute
foo = Node.new( "a" )
foo["attr"] = "bar"
diff --git a/test/rexml/test_listener.rb b/test/rexml/test_listener.rb
index f2cc4b7c351..0afbdcd5fff 100644
--- a/test/rexml/test_listener.rb
+++ b/test/rexml/test_listener.rb
@@ -11,7 +11,7 @@ class BaseTester < Test::Unit::TestCase
return unless defined? @listener
# Empty.
t1 = %Q{<string></string>}
- assert_equal( "", @listener.parse( t1 ),
+ assert_equal( "", @listener.parse( t1 ),
"Empty" )
end
@@ -59,11 +59,11 @@ class BaseTester < Test::Unit::TestCase
return unless defined? @listener
# CR.
t7 = %Q{<string> \r\n \r \n </string>}
- assert_equal( " \n \n \n ".unpack("C*").inspect,
+ assert_equal( " \n \n \n ".unpack("C*").inspect,
@listener.parse( t7 ).unpack("C*").inspect, "CR" )
end
- # The accent bug, and the code that exibits the bug, was contributed by
+ # The accent bug, and the code that exibits the bug, was contributed by
# Guilhem Vellut
class AccentListener
def tag_start(name,attributes)
diff --git a/test/rexml/test_notationdecl_mixin.rb b/test/rexml/test_notationdecl_mixin.rb
index d5212534c1e..68dcc555ace 100644
--- a/test/rexml/test_notationdecl_mixin.rb
+++ b/test/rexml/test_notationdecl_mixin.rb
@@ -31,11 +31,11 @@ class TestNotationDeclMixin < Test::Unit::TestCase
XMLEND
@doctype = REXML::Document.new(doc_string).doctype
end
-
+
def test_name
assert_equal('n1', @doctype.notation('n1').name)
end
-
+
def test_public_2
assert_equal(@pubid1, @doctype.notation('n1').public)
assert_equal(@pubid2, @doctype.notation('n2').public)
@@ -45,7 +45,7 @@ class TestNotationDeclMixin < Test::Unit::TestCase
assert_equal(@pubid6, @doctype.notation('n6').public)
assert_nil(@doctype.notation('n7').public)
end
-
+
def test_system_2
assert_equal(@sysid2, @doctype.notation('n2').system)
assert_nil(@doctype.notation('n3').system)
diff --git a/test/rexml/test_notationdecl_parsetest.rb b/test/rexml/test_notationdecl_parsetest.rb
index 6a8449e37dc..2e86d322e0f 100644
--- a/test/rexml/test_notationdecl_parsetest.rb
+++ b/test/rexml/test_notationdecl_parsetest.rb
@@ -14,7 +14,7 @@ class TestNotationDecl < Test::Unit::TestCase
XMLEND
@doctype = REXML::Document.new(doc_string).doctype
end
-
+
def test_notation
assert(@doctype.notation('n1'), "Testing notation n1")
assert(@doctype.notation('n2'), "Testing notation n2")
diff --git a/test/rexml/test_pullparser.rb b/test/rexml/test_pullparser.rb
index 1c9bcc00459..bfce60f2689 100644
--- a/test/rexml/test_pullparser.rb
+++ b/test/rexml/test_pullparser.rb
@@ -21,19 +21,19 @@ class PullParserTester < Test::Unit::TestCase
end
res[ :text ] += 1 if results.text?
end
- [ :xmldecl, :doctype, :a, :b ].each { |tag|
+ [ :xmldecl, :doctype, :a, :b ].each { |tag|
assert res[tag] , "#{tag} wasn't processed"
}
- assert_equal 4, res[ :text ]
- rescue ParseException
+ assert_equal 4, res[ :text ]
+ rescue ParseException
puts $!
end
def test_bad_document
source = "<a><b></a>"
parser = REXML::Parsers::PullParser.new(source)
- assert_raise(ParseException, "Parsing should have failed") {
- results = parser.pull while parser.has_next?
+ assert_raise(ParseException, "Parsing should have failed") {
+ results = parser.pull while parser.has_next?
}
end
diff --git a/test/rexml/test_sax.rb b/test/rexml/test_sax.rb
index 569270ceb14..f5d7fb44ce3 100644
--- a/test/rexml/test_sax.rb
+++ b/test/rexml/test_sax.rb
@@ -41,7 +41,7 @@ class SAX2Tester < Test::Unit::TestCase
}
start_document = 0
- end_document = 0
+ end_document = 0
parser.listen( :start_document ) { start_document += 1 }
parser.listen( :end_document ) { end_document += 1 }
parser.listen( :start_element, %w{ changelog bugs todo }, &blok )
@@ -69,8 +69,8 @@ class SAX2Tester < Test::Unit::TestCase
assert(text=~/@ANT_VERSION@/, "version was '#{text}'")
tc += 1
}
-
- begin
+
+ begin
parser.parse
rescue => exception
if exception.kind_of? Test::Unit::AssertionFailedError
@@ -255,12 +255,12 @@ class SAX2Tester < Test::Unit::TestCase
assert_equal(252, result[0])
end
- class Ticket68
- include REXML::SAX2Listener
- end
+ class Ticket68
+ include REXML::SAX2Listener
+ end
def test_ticket_68
parser = REXML::Parsers::SAX2Parser.new(File.new(fixture_path('ticket_68.xml')))
- parser.listen( Ticket68.new )
+ parser.listen( Ticket68.new )
begin
parser.parse
rescue
diff --git a/test/rexml/test_stream.rb b/test/rexml/test_stream.rb
index 2d9c177008e..3f876aed35f 100644
--- a/test/rexml/test_stream.rb
+++ b/test/rexml/test_stream.rb
@@ -12,11 +12,11 @@ class StreamTester < Test::Unit::TestCase
# Submitted by Han Holl
def test_listener
data = %Q{<session1 user="han" password="rootWeiler" />\n<session2 user="han" password="rootWeiler" />}
-
+
b = RequestReader.new( data )
b = RequestReader.new( data )
end
-
+
def test_ticket_49
source = StringIO.new( <<-EOL )
<!DOCTYPE foo [
@@ -26,7 +26,7 @@ class StreamTester < Test::Unit::TestCase
EOL
REXML::Document.parse_stream(source, MyListener.new)
end
-
+
def test_ticket_10
source = StringIO.new( <<-EOL )
<!DOCTYPE foo [
@@ -55,7 +55,7 @@ class StreamTester < Test::Unit::TestCase
end
end
listener.events = {}
-
+
REXML::Document.parse_stream( source, listener )
assert( listener.events[:entitydecl] )
diff --git a/test/rexml/test_validation_rng.rb b/test/rexml/test_validation_rng.rb
index b02363c4935..3643f0c32b8 100644
--- a/test/rexml/test_validation_rng.rb
+++ b/test/rexml/test_validation_rng.rb
@@ -334,7 +334,7 @@ class RNGValidation < Test::Unit::TestCase
error( validator, %q{<A><B>XYZ</B></A>} )
no_error( validator, %q{<A><B>Option 1</B></A>} )
no_error( validator, %q{<A><B>Option 2</B></A>} )
-
+
# Attribute values
rng = %q{
<?xml version="1.0" encoding="UTF-8"?>
@@ -772,13 +772,13 @@ class RNGValidation < Test::Unit::TestCase
error( validator, %q{<A><B/><B/></A>} )
error( validator, %q{<A><C/></A>} )
end
-
+
def error( validator, source )
parser = REXML::Parsers::TreeParser.new( source )
parser.add_listener( validator.reset )
- assert_raise( REXML::Validation::ValidationException,
+ assert_raise( REXML::Validation::ValidationException,
"Expected a validation error" ) { parser.parse }
end
diff --git a/test/rexml/test_xml_declaration_parent_child.rb b/test/rexml/test_xml_declaration_parent_child.rb
index 6386bed4f1e..d883e105c11 100644
--- a/test/rexml/test_xml_declaration_parent_child.rb
+++ b/test/rexml/test_xml_declaration_parent_child.rb
@@ -17,15 +17,15 @@ class TestXmlDeclaration < Test::Unit::TestCase
@root = @doc.root
@xml_declaration = @doc.children[0]
end
-
+
def test_xml_declaration_is_first_child
assert_kind_of(REXML::XMLDecl, @xml_declaration)
end
-
+
def test_xml_declaration_has_document_as_parent
assert_kind_of(REXML::Document, @xml_declaration.parent)
end
-
+
def test_xml_declaration_has_sibling
assert_kind_of(REXML::XMLDecl, @root.previous_sibling.previous_sibling)
assert_kind_of(REXML::Element, @xml_declaration.next_sibling.next_sibling)
diff --git a/test/rexml/test_xpath.rb b/test/rexml/test_xpath.rb
index d7ab9620a86..ad09fcafb28 100644
--- a/test/rexml/test_xpath.rb
+++ b/test/rexml/test_xpath.rb
@@ -163,7 +163,7 @@ class XPathTester < Test::Unit::TestCase
#res = XPath::first(doc, "*")
#assert_equal "a", res.name
- assert_equal( :processing_instruction,
+ assert_equal( :processing_instruction,
XPath::first(doc.root, "processing-instruction()").node_type)
assert_equal( :comment, XPath::first(doc.root, "comment()").node_type)
end
@@ -206,7 +206,7 @@ class XPathTester < Test::Unit::TestCase
# Here are some XPath tests that were originally submitted by ...
# The code has changed some, but the logic and the source documents are the
# same.
- # This method reads a document from a file, and then a series of xpaths,
+ # This method reads a document from a file, and then a series of xpaths,
# also from a file. It then checks each xpath against the source file.
def test_more
xmlsource = fixture_path("testsrc.xml")
@@ -222,7 +222,7 @@ class XPathTester < Test::Unit::TestCase
rt = doc.root
#puts "#"*80
#print "\nDoing #{line} " ; $stdout.flush
- doc.elements.each(line) do |el|
+ doc.elements.each(line) do |el|
#print "." ; $stdout.flush
results.root << el.clone
#results << el.to_s
@@ -255,7 +255,7 @@ class XPathTester < Test::Unit::TestCase
result = XPath::first( @@doc, "descendant::f[@a='c']")
assert_equal "11", result.attributes['id']
-
+
assert_equal "11", XPath::first(@@doc, "a/e/f[@a='c']").attributes["id"]
assert_equal "11", XPath::first(@@doc, "a/e/*[@a='c']").attributes["id"]
end
@@ -282,9 +282,9 @@ class XPathTester < Test::Unit::TestCase
d = XPath.first( doc, "//d" )
assert_equal "d", d.name
b = each_test( d, "ancestor::b" ) { |el|
- assert((1..2) === el.attributes['id'].to_i,
+ assert((1..2) === el.attributes['id'].to_i,
"Expected #{el.attributes['id']} to be either 1 or 2"
- )
+ )
}
assert_equal 2, b
end
@@ -316,7 +316,7 @@ class XPathTester < Test::Unit::TestCase
def test_lang
doc = Document.new(File.new(fixture_path("lang0.xml")))
#puts IO.read( "test/lang.xml" )
-
+
#puts XPath.match( doc, "//language/*" ).size
c = each_test( doc, "//language/*" ) { |element|
#puts "#{element.name}: #{element.text}"
@@ -428,9 +428,9 @@ class XPathTester < Test::Unit::TestCase
assert_equal 2, res.size
end
- # The following three paths were provided by
+ # The following three paths were provided by
# Jeni Tennison <jeni@jenitennison.com>
- # a consultant who is also an XSL and XPath expert
+ # a consultant who is also an XSL and XPath expert
#def test_child_cubed
# els = @@jeni.elements.to_a("*****")
# assert_equal 3, els.size
@@ -445,7 +445,7 @@ class XPathTester < Test::Unit::TestCase
# results = @@jeni.root.elements[1].elements[1].elements.to_a("../following-sibling::*[*[name() = name(current())]]")
# puts results
#end
-
+
# Contributed by Mike Stok
def test_starts_with
source = <<-EOF
@@ -511,7 +511,7 @@ class XPathTester < Test::Unit::TestCase
doc = Document.new source
[
- #['o', 2],
+ #['o', 2],
['foo', 1], ['bar', 0]].each { |search, expected|
set = doc.elements.to_a("//a[contains(@href, '#{search}')]")
assert_equal expected, set.size
@@ -614,7 +614,7 @@ class XPathTester < Test::Unit::TestCase
assert_equal 1, REXML::XPath.match(doc, "//b[number(@id) = (1 mod 2)]").size
assert_equal 1, REXML::XPath.match(doc, "//b[number(@id) = (4 div 2)]").size
end
-
+
# Contributed by Kouhei
def test_substring_before
doc = Document.new("<r><a/><b/><c/></r>")
@@ -629,27 +629,27 @@ class XPathTester < Test::Unit::TestCase
</b>
<c id='b'/>
</a>")
- assert_equal( 1, REXML::XPath.match(doc,
+ assert_equal( 1, REXML::XPath.match(doc,
"//*[local-name()='c' and @id='b']").size )
- assert_equal( 1, REXML::XPath.match(doc,
+ assert_equal( 1, REXML::XPath.match(doc,
"//*[ local-name()='c' and @id='b' ]").size )
- assert_equal( 1, REXML::XPath.match(doc,
+ assert_equal( 1, REXML::XPath.match(doc,
"//*[ local-name() = 'c' and @id = 'b' ]").size )
- assert_equal( 1,
+ assert_equal( 1,
REXML::XPath.match(doc, '/a/c[@id]').size )
assert_equal( 1,
REXML::XPath.match(doc, '/a/c[(@id)]').size )
- assert_equal( 1,
+ assert_equal( 1,
REXML::XPath.match(doc, '/a/c[ @id ]').size )
- assert_equal( 1,
+ assert_equal( 1,
REXML::XPath.match(doc, '/a/c[ (@id) ]').size )
- assert_equal( 1,
+ assert_equal( 1,
REXML::XPath.match(doc, '/a/c[( @id )]').size )
- assert_equal( 1, REXML::XPath.match(doc.root,
+ assert_equal( 1, REXML::XPath.match(doc.root,
'/a/c[ ( @id ) ]').size )
- assert_equal( 1, REXML::XPath.match(doc,
+ assert_equal( 1, REXML::XPath.match(doc,
'/a/c [ ( @id ) ] ').size )
- assert_equal( 1, REXML::XPath.match(doc,
+ assert_equal( 1, REXML::XPath.match(doc,
' / a / c [ ( @id ) ] ').size )
end
@@ -719,8 +719,8 @@ class XPathTester < Test::Unit::TestCase
end
def test_and
- d = Document.new %q{<doc><route run='*' title='HNO'
- destination='debian_production1' date='*' edition='*'
+ d = Document.new %q{<doc><route run='*' title='HNO'
+ destination='debian_production1' date='*' edition='*'
source='debian_satellite1'/></doc>}
assert_equal( nil, d.root.elements["route[@run='0']"] )
assert_equal( nil, d.root.elements["route[@run='0' and @title='HNO']"] )
@@ -803,7 +803,7 @@ class XPathTester < Test::Unit::TestCase
EOL
rd = REXML::Document.new( src )
union = rd.get_elements('//em|//strong')
- assert_equal(2, union.length,
+ assert_equal(2, union.length,
'Both tag types are returned by XPath union operator')
end
@@ -828,7 +828,7 @@ class XPathTester < Test::Unit::TestCase
d = REXML::Document.new( string )
c1 = XPath.match( d, '/a/*/*[1]' )
assert_equal( 1, c1.length )
- assert_equal( 'c1', c1[0].name )
+ assert_equal( 'c1', c1[0].name )
end
def test_sum
@@ -872,25 +872,25 @@ class XPathTester < Test::Unit::TestCase
</channel>
</rss>
EOL
- root_node = XPath.first(doc, "rss")
- assert_not_nil root_node
- channel_node = XPath.first(root_node, "channel")
- assert_not_nil channel_node
- items = XPath.match(channel_node, "*")
- assert_equal 4, items.size
- items = XPath.match(channel_node, "item")
+ root_node = XPath.first(doc, "rss")
+ assert_not_nil root_node
+ channel_node = XPath.first(root_node, "channel")
+ assert_not_nil channel_node
+ items = XPath.match(channel_node, "*")
+ assert_equal 4, items.size
+ items = XPath.match(channel_node, "item")
assert_equal 3, items.size # fails
end
def test_ticket_42
- source = "<a></a>"
- doc = Document.new(source)
- bElem = Element.new('b')
- doc.root.add_element(bElem)
- doc.elements.each('//b[name(..) = "a"]') { |x|
- assert_equal x,bElem
- }
+ source = "<a></a>"
+ doc = Document.new(source)
+ bElem = Element.new('b')
+ doc.root.add_element(bElem)
+ doc.elements.each('//b[name(..) = "a"]') { |x|
+ assert_equal x,bElem
+ }
end
def test_ticket_56
@@ -900,7 +900,7 @@ class XPathTester < Test::Unit::TestCase
column_headers = []
- REXML::XPath.each(finaldoc, '//h:form[@action="ModifyCampaign"]//h:th',
+ REXML::XPath.each(finaldoc, '//h:form[@action="ModifyCampaign"]//h:th',
namespaces) do |el|
node = REXML::XPath.first(el, 'h:a/text()', namespaces)
column_headers << (node ? node.value : nil)
@@ -915,17 +915,17 @@ class XPathTester < Test::Unit::TestCase
def test_ticket_70
string = <<EOF
-
-<mydoc>
- <someelement attribute="1.10">Text1, text,
-text</someelement>
+<mydoc>
- <someelement attribute="1.11">Text2, text,
-text</someelement>
+ <someelement attribute="1.10">Text1, text,
+text</someelement>
-
-</mydoc>
+ <someelement attribute="1.11">Text2, text,
+text</someelement>
+
+
+</mydoc>
EOF
doc = Document.new string
@@ -933,7 +933,7 @@ EOF
end
def test_ticket_43
- #url = http://news.search.yahoo.com/news/rss?p=market&ei=UTF-8&fl=0&x=wrt
+ #url = http://news.search.yahoo.com/news/rss?p=market&ei=UTF-8&fl=0&x=wrt
sum = Document.new(File.new(fixture_path("yahoo.xml"))).elements.to_a("//item").size
assert_equal( 10, sum )
@@ -988,12 +988,12 @@ EOF
def ticket_61_fixture(doc, xpath)
matches = []
doc.elements.each(xpath) do |element|
- matches << element
- assert_equal('Add', element.text)
+ matches << element
+ assert_equal('Add', element.text)
assert_equal('ButtonText', element.attributes['class'])
end
assert_equal(1, matches.length)
- end
+ end
def test_ticket_61_text
file = File.open(fixture_path("ticket_61.xml"))
diff --git a/test/rexml/test_xpath_attribute_query.rb b/test/rexml/test_xpath_attribute_query.rb
index 99439f22868..c0ad2c2e8ca 100644
--- a/test/rexml/test_xpath_attribute_query.rb
+++ b/test/rexml/test_xpath_attribute_query.rb
@@ -6,7 +6,7 @@ require 'test/unit'
require 'rexml/document'
class TestRexmlXpathAttributeQuery < Test::Unit::TestCase
-
+
# xmlstr1 and xmlstr2 only differ in the second line - namespaces in the root element
@@xmlstr1 = '<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:gd="http://schemas.google.com/g/2005" xmlns:gCal="http://schemas.google.com/gCal/2005">
@@ -26,7 +26,7 @@ class TestRexmlXpathAttributeQuery < Test::Unit::TestCase
</entry>
</feed>'
-
+
@@xmlstr2 = '<?xml version="1.0" encoding="UTF-8"?>
<feed>
<id>http://www.google.com/calendar/feeds/me%40gmail.com</id>
@@ -44,22 +44,22 @@ class TestRexmlXpathAttributeQuery < Test::Unit::TestCase
</author>
</entry>
</feed>'
-
+
# Fails
def test_xpath_query
do_test @@xmlstr1
end
-
+
# Passes
def test_xpath_query_no_namespace
do_test @@xmlstr2
end
-
+
def do_test(xmlString)
- hrefs = [
- "http://www.google.com/calendar/feeds/me%40gmail.com/private/full",
- "http://www.google.com/calendar/feeds/me%40gmail.com/acl/full",
- "http://www.google.com/calendar/feeds/me%40gmail.com/me%40gmail.com"
+ hrefs = [
+ "http://www.google.com/calendar/feeds/me%40gmail.com/private/full",
+ "http://www.google.com/calendar/feeds/me%40gmail.com/acl/full",
+ "http://www.google.com/calendar/feeds/me%40gmail.com/me%40gmail.com"
]
ctr=0
REXML::Document.new(xmlString).elements.each("feed/entry") do |element|
@@ -70,13 +70,13 @@ class TestRexmlXpathAttributeQuery < Test::Unit::TestCase
end
end
-
+
def test_another_way
doc = REXML::Document.new(@@xmlstr1)
- hrefs = [
- "http://www.google.com/calendar/feeds/me%40gmail.com/private/full",
- "http://www.google.com/calendar/feeds/me%40gmail.com/acl/full",
- "http://www.google.com/calendar/feeds/me%40gmail.com/me%40gmail.com"
+ hrefs = [
+ "http://www.google.com/calendar/feeds/me%40gmail.com/private/full",
+ "http://www.google.com/calendar/feeds/me%40gmail.com/acl/full",
+ "http://www.google.com/calendar/feeds/me%40gmail.com/me%40gmail.com"
]
ctr=0
REXML::XPath.each(doc, "//link[@rel='alternate']") do |element|
diff --git a/test/rexml/test_xpath_pred.rb b/test/rexml/test_xpath_pred.rb
index 373a7f562b9..584358966af 100644
--- a/test/rexml/test_xpath_pred.rb
+++ b/test/rexml/test_xpath_pred.rb
@@ -20,7 +20,7 @@ class XPathPredicateTester < Test::Unit::TestCase
</section>
</article>
EOL
-
+
def setup
@doc = REXML::Document.new( SRC )
@parser = REXML::Parsers::XPathParser.new
@@ -48,8 +48,8 @@ class XPathPredicateTester < Test::Unit::TestCase
assert_equal( 1, m.size )
assert_equal( "1", m[0].attributes["id"] )
end
-
- def do_path( path )
+
+ def do_path( path )
m = REXML::XPath.match( @doc, path )
#puts path, @parser.parse( path ).inspect
return m
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb
index b7f1a0093b6..3eebbfafcaa 100644
--- a/test/ruby/test_marshal.rb
+++ b/test/ruby/test_marshal.rb
@@ -462,7 +462,7 @@ class TestMarshal < Test::Unit::TestCase
attr_reader :foo
end
private_constant :PrivateClass
-
+
def test_marshal_private_class
o1 = PrivateClass.new("test")
o2 = Marshal.load(Marshal.dump(o1))
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 10b2708804a..0dcfeccef9a 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -141,7 +141,7 @@ class TestModule < Test::Unit::TestCase
:bClass3
end
end
-
+
class CClass < BClass
def self.cClass
end
diff --git a/test/ruby/test_super.rb b/test/ruby/test_super.rb
index 66faa70a763..743b71d73fd 100644
--- a/test/ruby/test_super.rb
+++ b/test/ruby/test_super.rb
@@ -146,7 +146,7 @@ class TestSuper < Test::Unit::TestCase
@first or fail
end
- def subseq
+ def subseq
@first or fail
end
end
diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb
index 838a7692f74..6a00b994438 100644
--- a/test/ruby/test_time.rb
+++ b/test/ruby/test_time.rb
@@ -176,7 +176,7 @@ class TestTime < Test::Unit::TestCase
t = Time.at(2**40 + "1/3".to_r, 9999999999999).utc
assert_equal(36812, t.year)
-
+
t = Time.at(-0x3fff_ffff_ffff_ffff)
assert_equal(-146138510344, t.year)
t = Time.at(-0x4000_0000_0000_0000)
diff --git a/test/rubygems/test_gem_commands_unpack_command.rb b/test/rubygems/test_gem_commands_unpack_command.rb
index 8291a6b9492..8764a4017b3 100644
--- a/test/rubygems/test_gem_commands_unpack_command.rb
+++ b/test/rubygems/test_gem_commands_unpack_command.rb
@@ -21,7 +21,7 @@ class TestGemCommandsUnpackCommand < Gem::TestCase
util_make_gems
assert_equal(
- @cmd.find_in_cache(@a1.file_name),
+ @cmd.find_in_cache(@a1.file_name),
Gem.cache_gem(@a1.file_name, @gemhome),
'found a-1.gem in the cache'
)
@@ -31,7 +31,7 @@ class TestGemCommandsUnpackCommand < Gem::TestCase
util_make_gems
util_setup_fake_fetcher
util_setup_spec_fetcher @a1
-
+
a1_data = nil
open Gem.cache_gem(@a1.file_name, @gemhome), 'rb' do |fp|
@@ -40,19 +40,19 @@ class TestGemCommandsUnpackCommand < Gem::TestCase
Gem::RemoteFetcher.fetcher.data['http://gems.example.com/gems/a-1.gem'] =
a1_data
-
+
dep = Gem::Dependency.new(@a1.name, @a1.version)
assert_equal(
- @cmd.get_path(dep),
- Gem.cache_gem(@a1.file_name, @gemhome),
+ @cmd.get_path(dep),
+ Gem.cache_gem(@a1.file_name, @gemhome),
'fetches a-1 and returns the cache path'
)
FileUtils.rm Gem.cache_gem(@a1.file_name, @gemhome)
assert_equal(
- @cmd.get_path(dep),
- Gem.cache_gem(@a1.file_name, @gemhome),
+ @cmd.get_path(dep),
+ Gem.cache_gem(@a1.file_name, @gemhome),
'when removed from cache, refetches a-1'
)
end
diff --git a/test/rubygems/test_gem_platform.rb b/test/rubygems/test_gem_platform.rb
index 666669b2338..485bab72a2e 100644
--- a/test/rubygems/test_gem_platform.rb
+++ b/test/rubygems/test_gem_platform.rb
@@ -235,7 +235,7 @@ class TestGemPlatform < Gem::TestCase
util_set_arch 'java'
assert_match 'java', Gem::Platform.local
assert_match 'jruby', Gem::Platform.local
-
+
util_set_arch 'universal-dotnet2.0'
assert_match 'universal-dotnet', Gem::Platform.local
assert_match 'universal-dotnet-2.0', Gem::Platform.local
@@ -243,13 +243,13 @@ class TestGemPlatform < Gem::TestCase
assert_match 'dotnet', Gem::Platform.local
assert_match 'dotnet-2.0', Gem::Platform.local
refute_match 'dotnet-4.0', Gem::Platform.local
-
+
util_set_arch 'universal-dotnet4.0'
assert_match 'universal-dotnet', Gem::Platform.local
- refute_match 'universal-dotnet-2.0', Gem::Platform.local
+ refute_match 'universal-dotnet-2.0', Gem::Platform.local
assert_match 'universal-dotnet-4.0', Gem::Platform.local
assert_match 'dotnet', Gem::Platform.local
- refute_match 'dotnet-2.0', Gem::Platform.local
+ refute_match 'dotnet-2.0', Gem::Platform.local
assert_match 'dotnet-4.0', Gem::Platform.local
util_set_arch 'powerpc-darwin'
diff --git a/test/rubygems/test_gem_silent_ui.rb b/test/rubygems/test_gem_silent_ui.rb
index 1968a89b285..8005b3b1cce 100644
--- a/test/rubygems/test_gem_silent_ui.rb
+++ b/test/rubygems/test_gem_silent_ui.rb
@@ -55,7 +55,7 @@ class TestGemSilentUI < Gem::TestCase
assert_empty out, 'No output'
assert_empty err, 'No output'
-
+
out, err = capture_io do
use_ui @sui do
value = @sui.ask_yes_no 'Problem?', true
@@ -66,7 +66,7 @@ class TestGemSilentUI < Gem::TestCase
assert_empty err, 'No output'
assert value, 'Value is true'
-
+
out, err = capture_io do
use_ui @sui do
value = @sui.ask_yes_no 'Problem?', false
diff --git a/test/syck/test_null.rb b/test/syck/test_null.rb
index b38bf50fbac..8bd710fe5ee 100644
--- a/test/syck/test_null.rb
+++ b/test/syck/test_null.rb
@@ -11,7 +11,7 @@ module Syck
---
- ~
- null
--
+-
- Null
- NULL
eoyml
diff --git a/test/syck/test_struct.rb b/test/syck/test_struct.rb
index 547c5f2d71a..8d4c538d989 100644
--- a/test/syck/test_struct.rb
+++ b/test/syck/test_struct.rb
@@ -30,7 +30,7 @@ module Syck
def test_load
obj = YAML.load(<<-eoyml)
---- !ruby/struct:StructWithIvar
+--- !ruby/struct:StructWithIvar
foo: bar
@bar: hello
eoyml
diff --git a/test/syck/test_yaml.rb b/test/syck/test_yaml.rb
index b346de4beee..7edf79dbe6b 100644
--- a/test/syck/test_yaml.rb
+++ b/test/syck/test_yaml.rb
@@ -505,7 +505,7 @@ EoY
WHOIS lookup made at 11:56:46 19-Mar-2010
---
+--
This WHOIS information is provided for free by Nominet UK the central registry
for .uk domain names. This information and the .uk WHOIS are:
@@ -517,7 +517,7 @@ includes restrictions on: (A) use of the data for advertising, or its
repackaging, recompilation, redistribution or reuse (B) obscuring, removing
or hiding any or all of this notice and (C) exceeding query rate or volume
limits. The data is provided on an 'as-is' basis and may lag behind the
-register. Access may be withdrawn or restricted at any time.
+register. Access may be withdrawn or restricted at any time.
EoY
end
diff --git a/test/test_pstore.rb b/test/test_pstore.rb
index b6f79251da7..b5deb9f3599 100644
--- a/test/test_pstore.rb
+++ b/test/test_pstore.rb
@@ -100,7 +100,7 @@ class PStoreTest < Test::Unit::TestCase
File.unlink("pstore.tmp2.#{Process.pid}") rescue nil
end
end
-
+
def test_nested_transaction_raises_error
assert_raise(PStore::Error) do
@pstore.transaction { @pstore.transaction { } }
diff --git a/test/thread/test_queue.rb b/test/thread/test_queue.rb
index 9c1818fac2a..b0ffe0866dc 100644
--- a/test/thread/test_queue.rb
+++ b/test/thread/test_queue.rb
@@ -28,7 +28,7 @@ class TestQueue < Test::Unit::TestCase
num_objects.times { from_workers.pop }
}
}.join
-
+
num_threads.times { to_workers.push nil }
workers.each { |t| t.join }
diff --git a/test/webrick/test_cookie.rb b/test/webrick/test_cookie.rb
index 1275dc8eff9..48f0235aeba 100644
--- a/test/webrick/test_cookie.rb
+++ b/test/webrick/test_cookie.rb
@@ -56,7 +56,7 @@ class TestWEBrickCookie < Test::Unit::TestCase
def test_parse_non_whitespace
data = [
- '$Version="1";',
+ '$Version="1";',
'Customer="WILE_E_COYOTE";$Path="/acme";',
'Part_Number="Rocket_Launcher_0001";$Path="/acme";',
'Shipping="FedEx";$Path="/acme"'
diff --git a/test/webrick/test_httprequest.rb b/test/webrick/test_httprequest.rb
index 0f411d98593..2d96c2fcb0d 100644
--- a/test/webrick/test_httprequest.rb
+++ b/test/webrick/test_httprequest.rb
@@ -309,7 +309,7 @@ class TestWEBrickHTTPRequest < Test::Unit::TestCase
msg = <<-_end_of_message_
POST /path HTTP/1.1
Expect: 100-continue
-
+
_end_of_message_
msg.gsub!(/^ {6}/, "")
req = WEBrick::HTTPRequest.new(WEBrick::Config::HTTP)
@@ -325,7 +325,7 @@ class TestWEBrickHTTPRequest < Test::Unit::TestCase
def test_continue_not_sent
msg = <<-_end_of_message_
POST /path HTTP/1.1
-
+
_end_of_message_
msg.gsub!(/^ {6}/, "")
req = WEBrick::HTTPRequest.new(WEBrick::Config::HTTP)
diff --git a/test/win32ole/test_win32ole_variant.rb b/test/win32ole/test_win32ole_variant.rb
index aa6504059fa..2b34d273e23 100644
--- a/test/win32ole/test_win32ole_variant.rb
+++ b/test/win32ole/test_win32ole_variant.rb
@@ -383,7 +383,7 @@ if defined?(WIN32OLE_VARIANT)
end
# this test failed because of VariantTimeToSystemTime
- # and SystemTimeToVariantTime API ignores wMilliseconds
+ # and SystemTimeToVariantTime API ignores wMilliseconds
# member of SYSTEMTIME struct.
#
# def test_conversion_time_nsec2date