summaryrefslogtreecommitdiff
path: root/test/ruby/test_argf.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-02-08 11:33:53 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-02-08 11:33:53 +0900
commitbf627e518d4575fd8ebfc28992b2177392b1dd20 (patch)
tree968db6218d05bd757f61da59f2bdea27e2ebdccd /test/ruby/test_argf.rb
parent1d686bdeb9d144f4ae2298c7ab5f46edefbd18dc (diff)
Forward keyword arguments to ARGF from global functions
Diffstat (limited to 'test/ruby/test_argf.rb')
-rw-r--r--test/ruby/test_argf.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_argf.rb b/test/ruby/test_argf.rb
index 874f0841d63..7922e5ad079 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