ruby-changes:16337
From: mame <ko1@a...>
Date: Sun, 13 Jun 2010 15:47:58 +0900 (JST)
Subject: [ruby-changes:16337] Ruby:r28312 (trunk): * test/ruby/test_rubyoptions.rb: add a simple test for __END__ and
mame 2010-06-13 15:47:44 +0900 (Sun, 13 Jun 2010) New Revision: 28312 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28312 Log: * test/ruby/test_rubyoptions.rb: add a simple test for __END__ and DATA. Modified files: trunk/ChangeLog trunk/test/ruby/test_rubyoptions.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 28311) +++ ChangeLog (revision 28312) @@ -1,3 +1,8 @@ +Sun Jun 13 15:46:07 2010 Yusuke Endoh <mame@t...> + + * test/ruby/test_rubyoptions.rb: add a simple test for __END__ and + DATA. + Sun Jun 13 04:24:18 2010 Marc-Andre Lafortune <ruby-core@m...> * lib/delegate.rb: Delegate !=, eql? and hash [ruby-core:26139] Index: test/ruby/test_rubyoptions.rb =================================================================== --- test/ruby/test_rubyoptions.rb (revision 28311) +++ test/ruby/test_rubyoptions.rb (revision 28312) @@ -401,4 +401,17 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/