diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_extlibs.rb | 1 | ||||
-rw-r--r-- | test/test_win32api.rb | 27 |
2 files changed, 0 insertions, 28 deletions
diff --git a/test/test_extlibs.rb b/test/test_extlibs.rb index 1d11dbe2e0..958c9ff73e 100644 --- a/test/test_extlibs.rb +++ b/test/test_extlibs.rb @@ -76,7 +76,6 @@ class TestExtLibs < Test::Unit::TestCase check_existence "strscan" check_existence "syslog" check_existence "thread" - check_existence "Win32API" check_existence "win32ole" check_existence "zlib", "this may be false positive, but should assert because rubygems requires this" end diff --git a/test/test_win32api.rb b/test/test_win32api.rb deleted file mode 100644 index f135964a27..0000000000 --- a/test/test_win32api.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: false -require "test/unit" -begin - $VERBOSE, verbose = nil, $VERBOSE - require "Win32API" -rescue LoadError -ensure - $VERBOSE = verbose -end - -class TestWin32API < Test::Unit::TestCase - def test_params_string - m2w = Win32API.new("kernel32", "MultiByteToWideChar", "ilpipi", "i") - str = "utf-8 string".encode("utf-8") - buf = "\0" * (str.size * 2) - assert_equal str.size, m2w.call(65001, 0, str, str.bytesize, buf, str.size) - assert_equal str.encode("utf-16le"), buf.force_encoding("utf-16le") - end - - def test_params_array - m2w = Win32API.new("kernel32", "MultiByteToWideChar", ["i", "l", "p", "i", "p", "i"], "i") - str = "utf-8 string".encode("utf-8") - buf = "\0" * (str.size * 2) - assert_equal str.size, m2w.call(65001, 0, str, str.bytesize, buf, str.size) - assert_equal str.encode("utf-16le"), buf.force_encoding("utf-16le") - end -end if defined?(Win32API) |