diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-02-18 14:34:26 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-02-18 14:35:46 +0900 |
commit | 041c2932e336b509b0ddc1fdbd9f160bce8d4893 (patch) | |
tree | bfa45f355d5c284f31662bef1b82663f10034b57 /test/ruby/test_argf.rb | |
parent | 38070ccdeb02022a0d9def239651c82cae9a0e79 (diff) | |
download | ruby-041c2932e336b509b0ddc1fdbd9f160bce8d4893.tar.gz |
Pass keyword arguments to IOs properly [Bug #16639]
Diffstat (limited to 'test/ruby/test_argf.rb')
-rw-r--r-- | test/ruby/test_argf.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_argf.rb b/test/ruby/test_argf.rb index a76bdccf45..277fa368f5 100644 --- a/test/ruby/test_argf.rb +++ b/test/ruby/test_argf.rb @@ -725,6 +725,13 @@ class TestArgf < Test::Unit::TestCase ["\"a\\n\\n\"", "\"b\\n\""], []) end + def test_each_line_chomp + assert_in_out_err(['-e', 'ARGF.each_line(chomp: false) {|para| p para}'], "a\nb\n", + ["\"a\\n\"", "\"b\\n\""], []) + assert_in_out_err(['-e', 'ARGF.each_line(chomp: true) {|para| p para}'], "a\nb\n", + ["\"a\"", "\"b\""], []) + end + def test_each_byte ruby('-e', "#{<<~"{#"}\n#{<<~'};'}", @t1.path, @t2.path, @t3.path) do |f| {# |