From bf627e518d4575fd8ebfc28992b2177392b1dd20 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 8 Feb 2021 11:33:53 +0900 Subject: Forward keyword arguments to ARGF from global functions --- test/ruby/test_argf.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_argf.rb b/test/ruby/test_argf.rb index 874f0841d6..7922e5ad07 100644 --- a/test/ruby/test_argf.rb +++ b/test/ruby/test_argf.rb @@ -1013,6 +1013,9 @@ class TestArgf < Test::Unit::TestCase ensure argf.close end + + assert_in_out_err(['-e', 'p readlines(chomp: true)'], "a\nb\n", + ["[\"a\", \"b\"]"], []) end def test_readline_chomp @@ -1023,6 +1026,9 @@ class TestArgf < Test::Unit::TestCase ensure argf.close end + + assert_in_out_err(['-e', 'p readline(chomp: true)'], "a\nb\n", + ["\"a\""], []) end def test_gets_chomp @@ -1033,6 +1039,9 @@ class TestArgf < Test::Unit::TestCase ensure argf.close end + + assert_in_out_err(['-e', 'p gets(chomp: true)'], "a\nb\n", + ["\"a\""], []) end def test_readlines_twice -- cgit v1.2.3