summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-08-26 14:18:58 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-08-26 14:18:58 +0000
commit662a3ca8064d973a4f96184d2598741b6ee3c7ae (patch)
tree5f9c568001929d5e08e17a5a0239b2dec6632725 /test
parentd65f94634cf52f6821e0c1c0911b88845b71d502 (diff)
merge revision(s) d118c84b0b9110462e479487ffaf175a75e5718e: [Backport #15199]
Fix IO#scanf on pipes on Windows IO.seek on a pipe on Windows raises Errno::EINVAL instead of Errno::ESPIPE. Fixes Ruby Bug #15199 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@67754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/scanf/test_scanfio.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/scanf/test_scanfio.rb b/test/scanf/test_scanfio.rb
index cec8750aef..f7c439276d 100644
--- a/test/scanf/test_scanfio.rb
+++ b/test/scanf/test_scanfio.rb
@@ -17,5 +17,12 @@ class TestScanfIO < Test::Unit::TestCase
ensure
fh.close
end
+
+ def test_pipe_scanf
+ r, w = IO.pipe
+ w.write('a')
+ w.close
+ assert_equal([], r.scanf('a'))
+ end
end