diff options
| author | take_cheeze <[email protected]> | 2014-06-07 22:39:30 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-08 01:38:44 +0900 |
| commit | aa187956cf8233a7b8183b63168bb432fc266cef (patch) | |
| tree | afce786a462162942c04a55f796dfc1263ae5b0c /mrbgems/mruby-bin-mruby | |
| parent | d75b84016cc152b7efcffaa3d50fd339419aaf6a (diff) | |
| download | mruby-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.rb | 14 |
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 |
