Skip to content

Commit a91db74

Browse files
authored
Merge pull request #2055 from ruby/skip-pty-test-windows
Skip PTY_test with Windows platform
2 parents ce6c754 + 88a0ca8 commit a91db74

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/stdlib/PTY_test.rb

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
require_relative "test_helper"
2-
require "pty"
2+
begin
3+
require "pty"
4+
rescue LoadError
5+
# Skip the tests if the library is not available like Windows platform
6+
end
37

48
class PTYSingletonTest < Test::Unit::TestCase
59
include TestHelper
@@ -45,4 +49,4 @@ def test_spawn
4549
assert_send_type "(*::String command) { ([ ::IO, ::IO, ::Integer ]) -> ::Integer } -> nil",
4650
PTY, :spawn, "echo" do |r, w, pid| 1 end
4751
end
48-
end
52+
end if defined?(PTY)

0 commit comments

Comments
 (0)