Skip to content

Commit

Permalink
Merge pull request #2055 from ruby/skip-pty-test-windows
Browse files Browse the repository at this point in the history
Skip PTY_test with Windows platform
  • Loading branch information
soutaro authored Oct 15, 2024
2 parents ce6c754 + 88a0ca8 commit a91db74
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/stdlib/PTY_test.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
require_relative "test_helper"
require "pty"
begin
require "pty"
rescue LoadError
# Skip the tests if the library is not available like Windows platform
end

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

0 comments on commit a91db74

Please sign in to comment.