summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-bin-mruby
diff options
context:
space:
mode:
authortake_cheeze <[email protected]>2014-06-07 22:39:30 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-06-08 01:38:44 +0900
commitaa187956cf8233a7b8183b63168bb432fc266cef (patch)
treeafce786a462162942c04a55f796dfc1263ae5b0c /mrbgems/mruby-bin-mruby
parentd75b84016cc152b7efcffaa3d50fd339419aaf6a (diff)
downloadmruby-aa187956cf8233a7b8183b63168bb432fc266cef.tar.gz
mruby-aa187956cf8233a7b8183b63168bb432fc266cef.zip
Add test for end-of-program marker.
Diffstat (limited to 'mrbgems/mruby-bin-mruby')
-rw-r--r--mrbgems/mruby-bin-mruby/bintest/mruby.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/mrbgems/mruby-bin-mruby/bintest/mruby.rb b/mrbgems/mruby-bin-mruby/bintest/mruby.rb
index a453400fc..de211c1ba 100644
--- a/mrbgems/mruby-bin-mruby/bintest/mruby.rb
+++ b/mrbgems/mruby-bin-mruby/bintest/mruby.rb
@@ -30,3 +30,17 @@ assert '$0 value' do
# one liner
assert_equal '"-e"', `./bin/mruby -e 'p $0'`.chomp
end
+
+assert '__END__', '8.6' do
+ script = Tempfile.new('test.rb')
+
+ script.write <<EOS
+p 'test'
+ __END__ = 'fin'
+p __END__
+__END__
+p 'legend'
+EOS
+ script.flush
+ assert_equal "\"test\"\n\"fin\"\n", `./bin/mruby #{script.path}`
+end