summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-24 01:59:18 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-24 01:59:18 +0000
commitfac216efa02e2e35e58d63ab5c8f9040ff3bf514 (patch)
tree89f11aa9e71446bdee88605d203c2118d7429954
parentcacecbfc9982b7a2ac9aa165859bfad73ddc32c8 (diff)
merges r28312 from trunk into ruby_1_9_2.
-- * test/ruby/test_rubyoptions.rb: add a simple test for __END__ and DATA. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/test_rubyoptions.rb13
2 files changed, 18 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d3fd73b696..a106622ce9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Jun 13 15:46:07 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * test/ruby/test_rubyoptions.rb: add a simple test for __END__ and
+ DATA.
+
Fri Jun 11 22:59:31 2010 Tanaka Akira <akr@fsij.org>
* include/ruby/missing.h (isnan): fix compilation error on OpenBSD.
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