summaryrefslogtreecommitdiff
path: root/test/win32ole
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
commit287a34ae0dfc23e4158f67cb7783d239f202c368 (patch)
tree5e35d5b41aae961b37cf6632f60c42f51c7aa775 /test/win32ole
parent9b52ae2e6491bb5d6c59e1799449f6268baf6f89 (diff)
* {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/win32ole')
-rw-r--r--test/win32ole/test_folderitem2_invokeverb.rb4
-rw-r--r--test/win32ole/test_nil2vtempty.rb2
-rw-r--r--test/win32ole/test_ole_methods.rb2
-rw-r--r--test/win32ole/test_win32ole.rb16
-rw-r--r--test/win32ole/test_win32ole_event.rb12
-rw-r--r--test/win32ole/test_win32ole_method.rb4
-rw-r--r--test/win32ole/test_win32ole_param.rb2
-rw-r--r--test/win32ole/test_win32ole_type.rb10
-rw-r--r--test/win32ole/test_win32ole_variable.rb2
-rw-r--r--test/win32ole/test_win32ole_variant.rb14
-rw-r--r--test/win32ole/test_word.rb2
11 files changed, 35 insertions, 35 deletions
diff --git a/test/win32ole/test_folderitem2_invokeverb.rb b/test/win32ole/test_folderitem2_invokeverb.rb
index 07cb980..5a5d475 100644
--- a/test/win32ole/test_folderitem2_invokeverb.rb
+++ b/test/win32ole/test_folderitem2_invokeverb.rb
@@ -32,7 +32,7 @@ if defined?(WIN32OLE)
# Search the 'Create Shortcut (&S)' string in Japanese.
# Yes, I know the string in the Windows 2000 Japanese Edition.
# But I do not know about the string in any other Windows.
- #
+ #
verbs = @fi2.verbs
verbs.extend(Enumerable)
@cp = WIN32OLE.codepage
@@ -40,7 +40,7 @@ if defined?(WIN32OLE)
WIN32OLE.codepage = 932
rescue
end
- @shortcut = verbs.collect{|verb|
+ @shortcut = verbs.collect{|verb|
verb.name
}.find {|name|
name.unpack("C*") == [131, 86, 131, 135, 129, 91, 131, 103, 131, 74, 131, 98, 131, 103, 130, 204, 141, 236, 144, 172, 40, 38, 83, 41]
diff --git a/test/win32ole/test_nil2vtempty.rb b/test/win32ole/test_nil2vtempty.rb
index 4be3902..8508ecd 100644
--- a/test/win32ole/test_nil2vtempty.rb
+++ b/test/win32ole/test_nil2vtempty.rb
@@ -26,7 +26,7 @@ if defined?(WIN32OLE)
rs = con.openSchema(4, [nil,nil,"DUMMY", "TABLE"])
assert(rs)
assert_equal("_Recordset", rs.ole_type.name)
-
+
rs = con.openSchema(4, [WIN32OLE_VARIANT::Empty, WIN32OLE_VARIANT::Empty, "DUMMY", "TABLE"])
assert(rs)
assert_equal("_Recordset", rs.ole_type.name)
diff --git a/test/win32ole/test_ole_methods.rb b/test/win32ole/test_ole_methods.rb
index ca1c03b..869828d 100644
--- a/test/win32ole/test_ole_methods.rb
+++ b/test/win32ole/test_ole_methods.rb
@@ -9,7 +9,7 @@ require "test/unit"
if defined?(WIN32OLE)
class TestWIN32OLE_FOR_PROPERTYPUTREF < Test::Unit::TestCase
-
+
def setup
@obj = WIN32OLE.new('Scripting.Dictionary')
end
diff --git a/test/win32ole/test_win32ole.rb b/test/win32ole/test_win32ole.rb
index b946aa6..18da3be 100644
--- a/test/win32ole/test_win32ole.rb
+++ b/test/win32ole/test_win32ole.rb
@@ -16,7 +16,7 @@ if defined?(WIN32OLE)
def test_convert_bignum
@dict1.add("a", 9999999999)
@dict1.add("b", 999999999)
- @dict1.add("c", @dict1.item("b") * 10 + 9)
+ @dict1.add("c", @dict1.item("b") * 10 + 9)
assert_equal(9999999999, @dict1.item("a"))
assert_equal(9999999999, @dict1.item("c"))
end
@@ -134,11 +134,11 @@ if defined?(WIN32OLE)
@dict1.add("ary2", [[1,2,"a"], [3,4,"b"]])
assert_equal([[1,2,"a"], [3,4,"b"]], @dict1["ary2"])
- @dict1.add("ary3", [[[1]]])
- assert_equal([[[1]]], @dict1["ary3"])
+ @dict1.add("ary3", [[[1]]])
+ assert_equal([[[1]]], @dict1["ary3"])
- @dict1.add("ary4", [[[1], [2], [3]], [[4], [5], [6]]])
- assert_equal([[[1],[2], [3]], [[4], [5], [6]]], @dict1["ary4"])
+ @dict1.add("ary4", [[[1], [2], [3]], [[4], [5], [6]]])
+ assert_equal([[[1],[2], [3]], [[4], [5], [6]]], @dict1["ary4"])
end
end
@@ -303,7 +303,7 @@ if defined?(WIN32OLE)
guid)
end
- #
+ #
# WIN32OLE.codepage is initialized according to Encoding.default_external.
#
# def test_s_codepage
@@ -342,7 +342,7 @@ if defined?(WIN32OLE)
assert_equal("\xA4\xA2".force_encoding("CP20932"), obj.value)
end
- WIN32OLE.codepage = cp
+ WIN32OLE.codepage = cp
file = fso.opentextfile(fname, 2, true)
file.write [0x3042].pack("U*").force_encoding("UTF-8")
file.close
@@ -353,7 +353,7 @@ if defined?(WIN32OLE)
assert_equal("\202\240", str)
# This test fail if codepage 20932 (euc) is not installed.
- begin
+ begin
WIN32OLE.codepage = 20932
rescue WIN32OLERuntimeError
end
diff --git a/test/win32ole/test_win32ole_event.rb b/test/win32ole/test_win32ole_event.rb
index dff9a68..7e7ee10 100644
--- a/test/win32ole/test_win32ole_event.rb
+++ b/test/win32ole/test_win32ole_event.rb
@@ -63,7 +63,7 @@ if defined?(WIN32OLE_EVENT)
@db.close
10.times do |i|
WIN32OLE_EVENT.new(@db)
- GC.start
+ GC.start
message_loop
@db.open
message_loop
@@ -176,7 +176,7 @@ if defined?(WIN32OLE_EVENT)
ev.on_event('WillConnect'){|*args|
{:return => 1, :ConnectionString => CONNSTR}
}
- @db.connectionString = 'XXX'
+ @db.connectionString = 'XXX'
@db.open
assert(true)
end
@@ -186,7 +186,7 @@ if defined?(WIN32OLE_EVENT)
ev.on_event('WillConnect'){|*args|
{:ConnectionString => CONNSTR}
}
- @db.connectionString = 'XXX'
+ @db.connectionString = 'XXX'
@db.open
assert(true)
end
@@ -196,7 +196,7 @@ if defined?(WIN32OLE_EVENT)
ev.on_event('WillConnect'){|*args|
{'ConnectionString' => CONNSTR}
}
- @db.connectionString = 'XXX'
+ @db.connectionString = 'XXX'
@db.open
assert(true)
end
@@ -206,7 +206,7 @@ if defined?(WIN32OLE_EVENT)
ev.on_event('WillConnect'){|*args|
{'return' => 1, 'ConnectionString' => CONNSTR}
}
- @db.connectionString = 'XXX'
+ @db.connectionString = 'XXX'
@db.open
assert(true)
end
@@ -216,7 +216,7 @@ if defined?(WIN32OLE_EVENT)
ev.on_event('WillConnect'){|*args|
{0 => CONNSTR}
}
- @db.connectionString = 'XXX'
+ @db.connectionString = 'XXX'
@db.open
assert(true)
end
diff --git a/test/win32ole/test_win32ole_method.rb b/test/win32ole/test_win32ole_method.rb
index f2ed0c6..762ef1d 100644
--- a/test/win32ole/test_win32ole_method.rb
+++ b/test/win32ole/test_win32ole_method.rb
@@ -6,7 +6,7 @@ require "test/unit"
if defined?(WIN32OLE_METHOD)
class TestWIN32OLE_METHOD < Test::Unit::TestCase
-
+
def setup
ole_type = WIN32OLE_TYPE.new("Microsoft Shell Controls And Automation", "Shell")
@m_open = WIN32OLE_METHOD.new(ole_type, "open")
@@ -125,7 +125,7 @@ if defined?(WIN32OLE_METHOD)
def test_params
params = @m_browse_for_folder.params
assert_instance_of(Array, params)
- assert_equal(4, params.size)
+ assert_equal(4, params.size)
assert_instance_of(WIN32OLE_PARAM, params[0])
end
diff --git a/test/win32ole/test_win32ole_param.rb b/test/win32ole/test_win32ole_param.rb
index 1c866ca..3b831c3 100644
--- a/test/win32ole/test_win32ole_param.rb
+++ b/test/win32ole/test_win32ole_param.rb
@@ -6,7 +6,7 @@ require "test/unit"
if defined?(WIN32OLE_PARAM)
class TestWIN32OLE_PARAM < Test::Unit::TestCase
-
+
def setup
ole_type = WIN32OLE_TYPE.new("Microsoft Internet Controls", "WebBrowser")
m_navigate = WIN32OLE_METHOD.new(ole_type, "Navigate")
diff --git a/test/win32ole/test_win32ole_type.rb b/test/win32ole/test_win32ole_type.rb
index f8ea525..8ecf2b2 100644
--- a/test/win32ole/test_win32ole_type.rb
+++ b/test/win32ole/test_win32ole_type.rb
@@ -51,7 +51,7 @@ if defined?(WIN32OLE_TYPE)
assert_equal(0, ole_type.helpcontext)
assert_equal([], ole_type.variables)
assert(ole_type.ole_methods.select{|m|/NameSpace/i =~ m.name}.size > 0)
-
+
ole_type2 = WIN32OLE_TYPE.new("{13709620-C279-11CE-A49E-444553540000}", "Shell")
assert_instance_of(WIN32OLE_TYPE, ole_type)
assert_equal(ole_type.name, ole_type2.name)
@@ -184,7 +184,7 @@ if defined?(WIN32OLE_TYPE)
assert_equal(1, otype.size)
otype = ole_types.select{|t| t.name == "DWebBrowserEvents2"}
assert_equal(1, otype.size)
- otype = ole_types.select{|t| t.name == "DWebBrowserEvents"}
+ otype = ole_types.select{|t| t.name == "DWebBrowserEvents"}
assert_equal(1, otype.size)
end
@@ -197,7 +197,7 @@ if defined?(WIN32OLE_TYPE)
assert_equal(0, otype.size)
otype = ole_types.select{|t| t.name == "DWebBrowserEvents2"}
assert_equal(1, otype.size)
- otype = ole_types.select{|t| t.name == "DWebBrowserEvents"}
+ otype = ole_types.select{|t| t.name == "DWebBrowserEvents"}
assert_equal(0, otype.size)
end
@@ -210,7 +210,7 @@ if defined?(WIN32OLE_TYPE)
assert_equal(0, otype.size)
otype = ole_types.select{|t| t.name == "DWebBrowserEvents2"}
assert_equal(1, otype.size)
- otype = ole_types.select{|t| t.name == "DWebBrowserEvents"}
+ otype = ole_types.select{|t| t.name == "DWebBrowserEvents"}
assert_equal(1, otype.size)
end
@@ -223,7 +223,7 @@ if defined?(WIN32OLE_TYPE)
assert_equal(0, otype.size)
otype = ole_types.select{|t| t.name == "DWebBrowserEvents2"}
assert_equal(1, otype.size)
- otype = ole_types.select{|t| t.name == "DWebBrowserEvents"}
+ otype = ole_types.select{|t| t.name == "DWebBrowserEvents"}
assert_equal(0, otype.size)
end
diff --git a/test/win32ole/test_win32ole_variable.rb b/test/win32ole/test_win32ole_variable.rb
index 43529d3..5fdcb07 100644
--- a/test/win32ole/test_win32ole_variable.rb
+++ b/test/win32ole/test_win32ole_variable.rb
@@ -6,7 +6,7 @@ require "test/unit"
if defined?(WIN32OLE_VARIABLE)
class TestWIN32OLE_VARIABLE < Test::Unit::TestCase
-
+
def setup
ole_type = WIN32OLE_TYPE.new("Microsoft Shell Controls And Automation", "ShellSpecialFolderConstants")
@var1 = ole_type.variables.find {|v| v.name == 'ssfDESKTOP'}
diff --git a/test/win32ole/test_win32ole_variant.rb b/test/win32ole/test_win32ole_variant.rb
index af38768..7bf6caa 100644
--- a/test/win32ole/test_win32ole_variant.rb
+++ b/test/win32ole/test_win32ole_variant.rb
@@ -102,7 +102,7 @@ if defined?(WIN32OLE_VARIANT)
assert_equal(0, obj.value)
assert_equal(WIN32OLE::VARIANT::VT_UI4, obj.vartype)
-
+
if defined?(WIN32OLE::VARIANT::VT_I8)
obj = WIN32OLE_VARIANT.new(nil, WIN32OLE::VARIANT::VT_I8)
assert_equal(0, obj.value)
@@ -114,7 +114,7 @@ if defined?(WIN32OLE_VARIANT)
assert_equal(0, obj.value)
assert_equal(WIN32OLE::VARIANT::VT_UI8, obj.vartype)
end
-
+
obj = WIN32OLE_VARIANT.new(nil, WIN32OLE::VARIANT::VT_INT)
assert_equal(0, obj.value)
assert_equal(WIN32OLE::VARIANT::VT_INT, obj.vartype)
@@ -251,7 +251,7 @@ if defined?(WIN32OLE_VARIANT)
assert_equal(5, obj.value)
assert_equal(WIN32OLE::VARIANT::VT_UINT|WIN32OLE::VARIANT::VT_BYREF, obj.vartype)
end
-
+
# This test is failed in cygwin.
# The tagVARIANT definition has no union member pllVal in cygwin.
def test_s_new_with_i8_byref
@@ -263,7 +263,7 @@ if defined?(WIN32OLE_VARIANT)
STDERR.puts("\n#{__FILE__}:#{__LINE__}:#{self.class.name}.test_s_new_with_i8_byref is skipped")
end
end
-
+
# This test is failed in cygwin.
# The tagVARIANT definition has no union member pullVal in cygwin.
def test_s_new_with_ui8_byref
@@ -319,7 +319,7 @@ if defined?(WIN32OLE_VARIANT)
obj = WIN32OLE_VARIANT.array([2,3], WIN32OLE::VARIANT::VT_I4|WIN32OLE::VARIANT::VT_BYREF)
assert_equal(WIN32OLE::VARIANT::VT_I4|WIN32OLE::VARIANT::VT_BYREF|WIN32OLE::VARIANT::VT_ARRAY, obj.vartype)
assert_equal([[0, 0, 0],[0, 0, 0]], obj.value)
-
+
obj = WIN32OLE_VARIANT.array([2,3], WIN32OLE::VARIANT::VT_I4|WIN32OLE::VARIANT::VT_ARRAY)
assert_instance_of(WIN32OLE_VARIANT, obj)
assert_equal(WIN32OLE::VARIANT::VT_I4|WIN32OLE::VARIANT::VT_ARRAY, obj.vartype)
@@ -383,7 +383,7 @@ if defined?(WIN32OLE_VARIANT)
end
def test_conversion_str2cy
- begin
+ begin
WIN32OLE.locale = 0x0411 # set locale Japanese
obj = WIN32OLE_VARIANT.new("\\10,000", WIN32OLE::VARIANT::VT_CY)
assert_equal("10000", obj.value)
@@ -464,7 +464,7 @@ if defined?(WIN32OLE_VARIANT)
obj = WIN32OLE_VARIANT.new(["abc", "123"], vartype)
assert_equal(vartype, obj.vartype)
assert_equal(["abc", "123"], obj.value)
-
+
vartype = WIN32OLE::VARIANT::VT_ARRAY|WIN32OLE::VARIANT::VT_BYREF|WIN32OLE::VARIANT::VT_BSTR
obj = WIN32OLE_VARIANT.new(["abc", "123"], vartype)
assert_equal(vartype, obj.vartype)
diff --git a/test/win32ole/test_word.rb b/test/win32ole/test_word.rb
index d5b2d91..e2ca6d4 100644
--- a/test/win32ole/test_word.rb
+++ b/test/win32ole/test_word.rb
@@ -38,7 +38,7 @@ if defined?(WIN32OLE)
@obj = WIN32OLE.new('Word.Application')
rescue WIN32OLERuntimeError
@obj = nil
- if !$skipped
+ if !$skipped
$skipped = true
end
end