summaryrefslogtreecommitdiff
path: root/test/win32ole
diff options
context:
space:
mode:
authorluislavena <luislavena@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-28 12:33:12 +0000
committerluislavena <luislavena@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-28 12:33:12 +0000
commit030111ac9c00f6437263134b33a4fa616bac864c (patch)
treed38e917a5b8de0ec866de631b10ec5469b5cbe7e /test/win32ole
parentf559d6160783da1b79aa928915890442d2eb587a (diff)
* test/win32ole/test_win32ole.rb (test_s_codepage_changed):
FileSystemObject only supports ANSI or UTF-16LE encoding. Patch by bosko (Bosko Ivanisevic) [ruby-trunk - Bug #6650] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/win32ole')
-rw-r--r--test/win32ole/test_win32ole.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/win32ole/test_win32ole.rb b/test/win32ole/test_win32ole.rb
index 8d72272..4abfe31 100644
--- a/test/win32ole/test_win32ole.rb
+++ b/test/win32ole/test_win32ole.rb
@@ -352,7 +352,7 @@ if defined?(WIN32OLE)
WIN32OLE.codepage = cp
file = fso.opentextfile(fname, 2, true)
begin
- file.write [0x3042].pack("U*").force_encoding("UTF-8")
+ file.write [0x3042].pack("U*").force_encoding("UTF-16")
ensure
file.close
end
@@ -360,7 +360,7 @@ if defined?(WIN32OLE)
open(fname, "r:ascii-8bit") {|ifs|
str = ifs.read
}
- assert_equal("\202\240", str)
+ assert_equal("\343\201\202", str)
# This test fail if codepage 20932 (euc) is not installed.
begin
@@ -371,14 +371,14 @@ if defined?(WIN32OLE)
WIN32OLE.codepage = cp
file = fso.opentextfile(fname, 2, true)
begin
- file.write [164, 162].pack("c*").force_encoding("EUC-JP")
+ file.write [164, 162].pack("c*").force_encoding("UTF-16")
ensure
file.close
end
open(fname, "r:ascii-8bit") {|ifs|
str = ifs.read
}
- assert_equal("\202\240", str)
+ assert_equal("\244\242", str)
end
ensure