From ff67aac193eed4e5ea0a6801d0903ddc35f21be0 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 10 Nov 2020 13:56:13 +0900 Subject: Removed win32api --- test/test_extlibs.rb | 1 - test/test_win32api.rb | 27 --------------------------- 2 files changed, 28 deletions(-) delete mode 100644 test/test_win32api.rb (limited to 'test') 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) -- cgit v1.2.1