diff options
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 03cea47ea9..afa5039353 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -401,4 +401,17 @@ class TestRubyOptions < Test::Unit::TestCase nil, opts) end + + def test_DATA + t = Tempfile.new(["test_ruby_test_rubyoption", ".rb"]) + t.puts "puts DATA.read.inspect" + t.puts "__END__" + t.puts "foo" + t.puts "bar" + t.puts "baz" + t.close + assert_in_out_err([t.path], "", %w("foo\\nbar\\nbaz\\n"), []) + ensure + t.close(true) if t + end end |