summaryrefslogtreecommitdiff
path: root/test/ruby/test_argf.rb
diff options
context:
space:
mode:
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 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