mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
f559d61607
commit
030111ac9c
2 changed files with 10 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
Thu Jun 28 20:33:15 2012 Luis Lavena <luislavena@gmail.com>
|
||||
|
||||
* 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]
|
||||
|
||||
Thu Jun 28 09:27:09 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
|
||||
|
||||
* class.c (class_instance_method_list): consider prepended Class/Module
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue