windows-pr 1.2.3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES +5 -0
  3. data/Rakefile +3 -3
  4. data/test/helper.rb +13 -0
  5. data/test/tc_clipboard.rb +2 -2
  6. data/test/tc_com.rb +2 -2
  7. data/test/tc_com_automation.rb +2 -2
  8. data/test/tc_console.rb +2 -2
  9. data/test/tc_debug.rb +3 -3
  10. data/test/tc_device_io.rb +2 -2
  11. data/test/tc_directory.rb +2 -2
  12. data/test/tc_error.rb +7 -7
  13. data/test/tc_eventlog.rb +5 -5
  14. data/test/tc_file.rb +18 -18
  15. data/test/tc_file_mapping.rb +7 -7
  16. data/test/tc_filesystem.rb +6 -6
  17. data/test/tc_gdi_bitmap.rb +2 -2
  18. data/test/tc_gdi_metafile.rb +2 -2
  19. data/test/tc_handle.rb +5 -6
  20. data/test/tc_library.rb +3 -3
  21. data/test/tc_limits.rb +4 -5
  22. data/test/tc_mailslot.rb +2 -2
  23. data/test/tc_memory.rb +2 -2
  24. data/test/tc_msvcrt_buffer.rb +2 -2
  25. data/test/tc_msvcrt_directory.rb +7 -7
  26. data/test/tc_msvcrt_file.rb +5 -5
  27. data/test/tc_msvcrt_io.rb +5 -5
  28. data/test/tc_msvcrt_string.rb +2 -2
  29. data/test/tc_msvcrt_time.rb +3 -3
  30. data/test/tc_national.rb +5 -5
  31. data/test/tc_network_management.rb +5 -5
  32. data/test/tc_network_snmp.rb +4 -4
  33. data/test/tc_network_winsock.rb +4 -4
  34. data/test/tc_nio.rb +4 -4
  35. data/test/tc_ntfs_winternl.rb +3 -3
  36. data/test/tc_path.rb +2 -2
  37. data/test/tc_pipe.rb +5 -6
  38. data/test/tc_process.rb +2 -2
  39. data/test/tc_registry.rb +2 -2
  40. data/test/tc_security.rb +2 -2
  41. data/test/tc_security_authentication.rb +2 -2
  42. data/test/tc_security_sspi.rb +2 -2
  43. data/test/tc_service.rb +4 -4
  44. data/test/tc_shell.rb +4 -4
  45. data/test/tc_socket.rb +15 -5
  46. data/test/tc_sound.rb +4 -4
  47. data/test/tc_synchronize.rb +5 -5
  48. data/test/tc_system_info.rb +3 -3
  49. data/test/tc_thread.rb +2 -2
  50. data/test/tc_time.rb +4 -4
  51. data/test/tc_tool_helper.rb +2 -2
  52. data/test/tc_unicode.rb +8 -8
  53. data/test/tc_volume.rb +2 -2
  54. data/test/tc_window.rb +4 -4
  55. data/test/tc_window_classes.rb +4 -4
  56. data/test/tc_window_dialog.rb +4 -4
  57. data/test/tc_window_menu.rb +4 -4
  58. data/test/tc_window_message.rb +4 -4
  59. data/test/tc_window_properties.rb +3 -3
  60. data/test/tc_window_timer.rb +3 -3
  61. data/test/tc_wsa.rb +2 -2
  62. data/windows-pr.gemspec +1 -3
  63. metadata +13 -12
@@ -4,14 +4,13 @@
4
4
  # Test case for the Windows::Limits module.
5
5
  #####################################################################
6
6
  require 'windows/limits'
7
- require 'test/unit'
7
+ require 'minitest/autorun'
8
8
 
9
9
  class LimitsFoo
10
- include Windows::Limits
10
+ include Windows::Limits
11
11
  end
12
12
 
13
- class TC_Windows_Limits < Test::Unit::TestCase
14
-
13
+ class TC_Windows_Limits < MiniTest::Unit::TestCase
15
14
  def setup
16
15
  @foo = LimitsFoo.new
17
16
  end
@@ -27,7 +26,7 @@ class TC_Windows_Limits < Test::Unit::TestCase
27
26
  assert_equal(0xffff, LimitsFoo::MAXWORD)
28
27
  assert_equal(0xffffffff, LimitsFoo::MAXDWORD)
29
28
  end
30
-
29
+
31
30
  def teardown
32
31
  @foo = nil
33
32
  end
@@ -4,9 +4,9 @@
4
4
  # Test case for the Windows::Mailslot module.
5
5
  #####################################################################
6
6
  require 'windows/mailslot'
7
- require 'test/unit'
7
+ require 'minitest/autorun'
8
8
 
9
- class TC_Windows_Mailslot < Test::Unit::TestCase
9
+ class TC_Windows_Mailslot < MiniTest::Unit::TestCase
10
10
  include Windows::Mailslot
11
11
 
12
12
  def test_constants
@@ -4,13 +4,13 @@
4
4
  # Test case for the Windows::Memory module.
5
5
  #####################################################################
6
6
  require 'windows/memory'
7
- require 'test/unit'
7
+ require 'minitest/autorun'
8
8
 
9
9
  class MemoryFoo
10
10
  include Windows::Memory
11
11
  end
12
12
 
13
- class TC_Windows_Memory < Test::Unit::TestCase
13
+ class TC_Windows_Memory < MiniTest::Unit::TestCase
14
14
  def setup
15
15
  @foo = MemoryFoo.new
16
16
  @path = "C:\\"
@@ -5,9 +5,9 @@
5
5
  #####################################################################
6
6
  require 'rubygems'
7
7
  require 'windows/msvcrt/buffer'
8
- require 'test/unit'
8
+ require 'minitest/autorun'
9
9
 
10
- class TC_Windows_MSVCRT_Buffer < Test::Unit::TestCase
10
+ class TC_Windows_MSVCRT_Buffer < MiniTest::Unit::TestCase
11
11
  include Windows::MSVCRT::Buffer
12
12
 
13
13
  def test_method_constants
@@ -5,9 +5,9 @@
5
5
  #####################################################################
6
6
  require 'windows/msvcrt/directory'
7
7
  require 'fileutils'
8
- require 'test/unit'
8
+ require 'minitest/autorun'
9
9
 
10
- class TC_Windows_MSVCRT_Directory < Test::Unit::TestCase
10
+ class TC_Windows_MSVCRT_Directory < MiniTest::Unit::TestCase
11
11
  include Windows::MSVCRT::Directory
12
12
 
13
13
  def setup
@@ -33,7 +33,7 @@ class TC_Windows_MSVCRT_Directory < Test::Unit::TestCase
33
33
  assert_not_nil(Searchenv)
34
34
  assert_not_nil(Wsearchenv)
35
35
  end
36
-
36
+
37
37
  def test_chdir
38
38
  assert_nothing_raised{ chdir('..') }
39
39
  assert_equal(File.dirname(@pwd), Dir.pwd)
@@ -66,14 +66,14 @@ class TC_Windows_MSVCRT_Directory < Test::Unit::TestCase
66
66
  def test_mkdir
67
67
  assert(self.respond_to?(:mkdir, true))
68
68
  assert_nothing_raised{ mkdir(@dir) }
69
- assert_equal(true, File.exists?(@dir))
69
+ assert_equal(true, File.exist?(@dir))
70
70
  end
71
71
 
72
72
  def test_rmdir
73
- Dir.mkdir(@dir) unless File.exists?(@dir)
73
+ Dir.mkdir(@dir) unless File.exist?(@dir)
74
74
  assert(self.respond_to?(:rmdir, true))
75
75
  assert_nothing_raised{ rmdir(@dir) }
76
- assert_equal(false, File.exists?(@dir))
76
+ assert_equal(false, File.exist?(@dir))
77
77
  end
78
78
 
79
79
  def test_searchenv
@@ -88,7 +88,7 @@ class TC_Windows_MSVCRT_Directory < Test::Unit::TestCase
88
88
  end
89
89
 
90
90
  def teardown
91
- FileUtils.rm_f(@dir) if File.exists?(@dir)
91
+ FileUtils.rm_f(@dir) if File.exist?(@dir)
92
92
  @pwd = nil
93
93
  @dir = nil
94
94
  @buf = 0
@@ -4,13 +4,13 @@
4
4
  # Test case for the Windows::MSVCRT::File module.
5
5
  #####################################################################
6
6
  require 'windows/msvcrt/file'
7
- require 'test/unit'
7
+ require 'minitest/autorun'
8
8
 
9
9
  class MFileFoo
10
10
  include Windows::MSVCRT::File
11
11
  end
12
12
 
13
- class TC_Windows_MSVCRT_File < Test::Unit::TestCase
13
+ class TC_Windows_MSVCRT_File < MiniTest::Unit::TestCase
14
14
  def setup
15
15
  @foo = MFileFoo.new
16
16
  end
@@ -25,7 +25,7 @@ class TC_Windows_MSVCRT_File < Test::Unit::TestCase
25
25
  assert_not_nil(MFileFoo::S_IWRITE)
26
26
  assert_not_nil(MFileFoo::S_IEXEC)
27
27
  end
28
-
28
+
29
29
  def test_method_constants
30
30
  assert_not_nil(MFileFoo::Chmod)
31
31
  assert_not_nil(MFileFoo::Chsize)
@@ -37,7 +37,7 @@ class TC_Windows_MSVCRT_File < Test::Unit::TestCase
37
37
  assert_not_nil(MFileFoo::Wstat)
38
38
  assert_not_nil(MFileFoo::Wstat64)
39
39
  end
40
-
40
+
41
41
  def test_chmod
42
42
  assert_respond_to(@foo, :chmod)
43
43
  end
@@ -73,7 +73,7 @@ class TC_Windows_MSVCRT_File < Test::Unit::TestCase
73
73
  def test_wstat64
74
74
  assert_respond_to(@foo, :wstat64)
75
75
  end
76
-
76
+
77
77
  def teardown
78
78
  @foo = nil
79
79
  end
@@ -4,13 +4,13 @@
4
4
  # Test case for the Windows::MSVCRT::IO module.
5
5
  #####################################################################
6
6
  require 'windows/msvcrt/io'
7
- require 'test/unit'
7
+ require 'minitest/autorun'
8
8
 
9
9
  class MIOFoo
10
10
  include Windows::MSVCRT::IO
11
11
  end
12
12
 
13
- class TC_Windows_MSVCRT_IO < Test::Unit::TestCase
13
+ class TC_Windows_MSVCRT_IO < MiniTest::Unit::TestCase
14
14
  def setup
15
15
  @foo = MIOFoo.new
16
16
  end
@@ -18,14 +18,14 @@ class TC_Windows_MSVCRT_IO < Test::Unit::TestCase
18
18
  def test_numeric_constants
19
19
  assert_not_nil(MIOFoo::S_IFMT)
20
20
  end
21
-
21
+
22
22
  def test_method_constants
23
23
  assert_not_nil(MIOFoo::Clearerr)
24
24
  assert_not_nil(MIOFoo::Close)
25
25
  assert_not_nil(MIOFoo::Fclose)
26
26
  assert_not_nil(MIOFoo::Fileno)
27
27
  end
28
-
28
+
29
29
  def test_clearerr
30
30
  assert_respond_to(@foo, :clearerr)
31
31
  end
@@ -41,7 +41,7 @@ class TC_Windows_MSVCRT_IO < Test::Unit::TestCase
41
41
  def test_fileno
42
42
  assert_respond_to(@foo, :fileno)
43
43
  end
44
-
44
+
45
45
  def teardown
46
46
  @foo = nil
47
47
  end
@@ -4,9 +4,9 @@
4
4
  # Test case for the Windows::MSVCRT::String module.
5
5
  #####################################################################
6
6
  require 'windows/msvcrt/string'
7
- require 'test/unit'
7
+ require 'minitest/autorun'
8
8
 
9
- class TC_Windows_MSVCRT_String < Test::Unit::TestCase
9
+ class TC_Windows_MSVCRT_String < MiniTest::Unit::TestCase
10
10
  include Windows::MSVCRT::String
11
11
 
12
12
  def setup
@@ -4,15 +4,15 @@
4
4
  # Test case for the Windows::MSVCRT::Time module.
5
5
  #####################################################################
6
6
  require 'windows/msvcrt/time'
7
- require 'test/unit'
7
+ require 'minitest/autorun'
8
8
 
9
- class TC_Windows_MSVCRT_Time < Test::Unit::TestCase
9
+ class TC_Windows_MSVCRT_Time < MiniTest::Unit::TestCase
10
10
  include Windows::MSVCRT::Time
11
11
 
12
12
  def test_method_constants
13
13
  assert_not_nil(Asctime)
14
14
  end
15
-
15
+
16
16
  def test_asctime
17
17
  assert(self.respond_to?(:asctime, true))
18
18
  end
@@ -4,13 +4,13 @@
4
4
  # Test case for the Windows::National module.
5
5
  #####################################################################
6
6
  require 'windows/national'
7
- require 'test/unit'
7
+ require 'minitest/autorun'
8
8
 
9
9
  class NationalFoo
10
- include Windows::National
10
+ include Windows::National
11
11
  end
12
12
 
13
- class TC_Windows_National < Test::Unit::TestCase
13
+ class TC_Windows_National < MiniTest::Unit::TestCase
14
14
  def setup
15
15
  @foo = NationalFoo.new
16
16
  end
@@ -22,7 +22,7 @@ class TC_Windows_National < Test::Unit::TestCase
22
22
  assert_equal(1024, NationalFoo::LOCALE_USER_DEFAULT)
23
23
  assert_equal(8323072, NationalFoo::LOCALE_INVARIANT)
24
24
  end
25
-
25
+
26
26
  def test_method_constants
27
27
  assert_not_nil(NationalFoo::GetACP)
28
28
  assert_not_nil(NationalFoo::GetDateFormat)
@@ -31,7 +31,7 @@ class TC_Windows_National < Test::Unit::TestCase
31
31
  assert_not_nil(NationalFoo::GetUserDefaultLangID)
32
32
  assert_not_nil(NationalFoo::GetUserDefaultLCID)
33
33
  end
34
-
34
+
35
35
  def teardown
36
36
  @foo = nil
37
37
  end
@@ -4,13 +4,13 @@
4
4
  # Test case for the Windows::NetworkManagement module.
5
5
  #####################################################################
6
6
  require 'windows/network/management'
7
- require 'test/unit'
7
+ require 'minitest/autorun'
8
8
 
9
9
  class NetworkManagementFoo
10
- include Windows::Network::Management
10
+ include Windows::Network::Management
11
11
  end
12
12
 
13
- class TC_Windows_Network_Management < Test::Unit::TestCase
13
+ class TC_Windows_Network_Management < MiniTest::Unit::TestCase
14
14
  def setup
15
15
  @foo = NetworkManagementFoo.new
16
16
  end
@@ -20,12 +20,12 @@ class TC_Windows_Network_Management < Test::Unit::TestCase
20
20
  assert_equal(0xFFFFFFFF, NetworkManagementFoo::MAX_PREFERRED_LENGTH)
21
21
  assert_equal(0x00000001, NetworkManagementFoo::SV_TYPE_WORKSTATION)
22
22
  end
23
-
23
+
24
24
  def test_method_constants
25
25
  assert_not_nil(NetworkManagementFoo::NetAlertRaise)
26
26
  assert_not_nil(NetworkManagementFoo::NetAlertRaiseEx)
27
27
  end
28
-
28
+
29
29
  def teardown
30
30
  @foo = nil
31
31
  end
@@ -4,13 +4,13 @@
4
4
  # Test case for the Windows::NetworkSNMP module.
5
5
  #####################################################################
6
6
  require 'windows/network/snmp'
7
- require 'test/unit'
7
+ require 'minitest/autorun'
8
8
 
9
9
  class NetworkSNMPFoo
10
10
  include Windows::Network::SNMP
11
11
  end
12
12
 
13
- class TC_Windows_Network_SNMP < Test::Unit::TestCase
13
+ class TC_Windows_Network_SNMP < MiniTest::Unit::TestCase
14
14
  def setup
15
15
  @foo = NetworkSNMPFoo.new
16
16
  end
@@ -19,12 +19,12 @@ class TC_Windows_Network_SNMP < Test::Unit::TestCase
19
19
  assert_equal(0, NetworkSNMPFoo::SNMPAPI_FAILURE)
20
20
  assert_equal(1, NetworkSNMPFoo::SNMPAPI_SUCCESS)
21
21
  end
22
-
22
+
23
23
  def test_method_constants
24
24
  assert_not_nil(NetworkSNMPFoo::SnmpCleanup)
25
25
  assert_not_nil(NetworkSNMPFoo::SnmpClose)
26
26
  end
27
-
27
+
28
28
  def teardown
29
29
  @foo = nil
30
30
  end
@@ -4,13 +4,13 @@
4
4
  # Test case for the Windows::Winsock module.
5
5
  #####################################################################
6
6
  require 'windows/network/winsock'
7
- require 'test/unit'
7
+ require 'minitest/autorun'
8
8
 
9
9
  class WinsockFoo
10
10
  include Windows::Network::Winsock
11
11
  end
12
12
 
13
- class TC_Windows_Network_Winsock < Test::Unit::TestCase
13
+ class TC_Windows_Network_Winsock < MiniTest::Unit::TestCase
14
14
  def setup
15
15
  @foo = WinsockFoo.new
16
16
  end
@@ -18,7 +18,7 @@ class TC_Windows_Network_Winsock < Test::Unit::TestCase
18
18
  def test_numeric_constants
19
19
  assert_equal(0, WinsockFoo::NS_DEFAULT)
20
20
  end
21
-
21
+
22
22
  def test_method_constants
23
23
  assert_not_nil(WinsockFoo::GetTypeByName)
24
24
  end
@@ -27,7 +27,7 @@ class TC_Windows_Network_Winsock < Test::Unit::TestCase
27
27
  assert_respond_to(@foo, :gethostbyname)
28
28
  assert_respond_to(@foo, :GetTypeByName)
29
29
  end
30
-
30
+
31
31
  def teardown
32
32
  @foo = nil
33
33
  end
@@ -4,13 +4,13 @@
4
4
  # Test case for the Windows::NIO module.
5
5
  #####################################################################
6
6
  require 'windows/nio'
7
- require 'test/unit'
7
+ require 'minitest/autorun'
8
8
 
9
9
  class NIOFoo
10
10
  include Windows::NIO
11
11
  end
12
12
 
13
- class TC_Windows_NIO < Test::Unit::TestCase
13
+ class TC_Windows_NIO < MiniTest::Unit::TestCase
14
14
  def setup
15
15
  @foo = NIOFoo.new
16
16
  end
@@ -20,12 +20,12 @@ class TC_Windows_NIO < Test::Unit::TestCase
20
20
  assert_equal(1, NIOFoo::OF_WRITE)
21
21
  assert_equal(2, NIOFoo::OF_READWRITE)
22
22
  end
23
-
23
+
24
24
  def test_method_constants
25
25
  assert_not_nil(NIOFoo::CancelIo)
26
26
  assert_not_nil(NIOFoo::ReadFileScatter)
27
27
  end
28
-
28
+
29
29
  def teardown
30
30
  @foo = nil
31
31
  end
@@ -6,9 +6,9 @@
6
6
  require 'windows/handle'
7
7
  require 'windows/ntfs/winternl'
8
8
  require 'windows/error'
9
- require 'test/unit'
9
+ require 'minitest/autorun'
10
10
 
11
- class TC_Windows_NTFS_Winternl < Test::Unit::TestCase
11
+ class TC_Windows_NTFS_Winternl < MiniTest::Unit::TestCase
12
12
  include Windows::Handle
13
13
  include Windows::NTFS::Winternl
14
14
  include Windows::Error
@@ -42,7 +42,7 @@ class TC_Windows_NTFS_Winternl < Test::Unit::TestCase
42
42
 
43
43
  def teardown
44
44
  @handle.close if @handle
45
- File.delete(@name) if File.exists?(@name)
45
+ File.delete(@name) if File.exist?(@name)
46
46
  @name = nil
47
47
  end
48
48
  end
@@ -4,13 +4,13 @@
4
4
  # Test case for the Windows::Path module.
5
5
  #####################################################################
6
6
  require "windows/path"
7
- require "test/unit"
7
+ require "minitest/autorun"
8
8
 
9
9
  class PathFoo
10
10
  include Windows::Path
11
11
  end
12
12
 
13
- class TC_Windows_Path < Test::Unit::TestCase
13
+ class TC_Windows_Path < MiniTest::Unit::TestCase
14
14
  def setup
15
15
  @foo = PathFoo.new
16
16
  @path = "C:\\"
@@ -4,18 +4,17 @@
4
4
  # Test case for the Windows::Pipe module.
5
5
  #####################################################################
6
6
  require 'windows/pipe'
7
- require 'test/unit'
7
+ require 'minitest/autorun'
8
8
 
9
9
  class PipeFoo
10
10
  include Windows::Pipe
11
11
  end
12
12
 
13
- class TC_Windows_Pipe < Test::Unit::TestCase
14
-
13
+ class TC_Windows_Pipe < MiniTest::Unit::TestCase
15
14
  def setup
16
15
  @foo = PipeFoo.new
17
16
  end
18
-
17
+
19
18
  def test_numeric_constants
20
19
  assert_equal(0x00000001, PipeFoo::NMPWAIT_NOWAIT)
21
20
  assert_equal(0xffffffff, PipeFoo::NMPWAIT_WAIT_FOREVER)
@@ -32,7 +31,7 @@ class TC_Windows_Pipe < Test::Unit::TestCase
32
31
  assert_equal(0x00000000, PipeFoo::PIPE_CLIENT_END)
33
32
  assert_equal(0x00000001, PipeFoo::PIPE_SERVER_END)
34
33
  end
35
-
34
+
36
35
  def test_method_constants
37
36
  assert_not_nil(PipeFoo::CallNamedPipe)
38
37
  assert_not_nil(PipeFoo::ConnectNamedPipe)
@@ -46,7 +45,7 @@ class TC_Windows_Pipe < Test::Unit::TestCase
46
45
  assert_not_nil(PipeFoo::TransactNamedPipe)
47
46
  assert_not_nil(PipeFoo::WaitNamedPipe)
48
47
  end
49
-
48
+
50
49
  def teardown
51
50
  @foo = nil
52
51
  end