From 678bcfcaa686c0b3125c856a3fc53186126c7554 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 2 Dec 2022 17:39:30 +0900 Subject: [ruby/io-console] Check rawmode option names strictly https://github.com/ruby/io-console/commit/aa8fc7e947 --- test/io/console/test_io_console.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/io') 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 -- cgit v1.2.1