summaryrefslogtreecommitdiff
path: root/test/io/console
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-12-02 17:39:30 +0900
committergit <svn-admin@ruby-lang.org>2022-12-02 10:33:35 +0000
commit678bcfcaa686c0b3125c856a3fc53186126c7554 (patch)
tree7569d895ac42cce2d025cb21e83ba88afd1eb191 /test/io/console
parent7390eb43fe1bfb069af80ba8f73f7dc4999df0fd (diff)
[ruby/io-console] Check rawmode option names strictly
https://github.com/ruby/io-console/commit/aa8fc7e947
Diffstat (limited to 'test/io/console')
-rw-r--r--test/io/console/test_io_console.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb
index 27d8e4a988..ea23db5b4b 100644
--- a/test/io/console/test_io_console.rb
+++ b/test/io/console/test_io_console.rb
@@ -49,6 +49,14 @@ class TestIO_Console < Test::Unit::TestCase
assert_include(e.message, IO::NULL)
end
end
+
+ def test_bad_keyword
+ assert_raise_with_message(ArgumentError, /unknown keyword:.*bad/) do
+ File.open(IO::NULL) do |f|
+ f.raw(bad: 0)
+ end
+ end
+ end
end
defined?(PTY) and defined?(IO.console) and TestIO_Console.class_eval do