diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-08-22 15:20:07 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu.nakada@gmail.com> | 2024-08-22 16:32:54 +0900 |
| commit | 004c6a6ed16a66f027c12606f96153a03e624005 (patch) | |
| tree | 351c27b642fb033e1adfdec2431bf0b08f13e251 /test/ruby | |
| parent | 29500e3034681a30045dea462d6bb653e8600738 (diff) | |
Use ruby to suppress a warning message by cmd.exe
It is expected that reading from command with offset fails by ESPIPE
and the pipe will be closed immediately. While this causes the child
process to terminate by SIGPIPE usually, cmd.exe yields the message
bellow.
```
The process tried to write to a nonexistent pipe.
```
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11433
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_io.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index ce81286c4d..8b4dc1ed98 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -2543,7 +2543,7 @@ class TestIO < Test::Unit::TestCase end assert_raise(Errno::ESPIPE) do assert_deprecated_warning(/IO process creation with a leading '\|'/) do # https://bugs.ruby-lang.org/issues/19630 - IO.read("|echo foo", 1, 1) + IO.read("|#{EnvUtil.rubybin} -e 'puts :foo'", 1, 1) end end end |
