diff options
| author | take_cheeze <[email protected]> | 2014-06-07 22:39:30 +0900 |
|---|---|---|
| committer | take_cheeze <[email protected]> | 2014-06-07 22:41:02 +0900 |
| commit | 0fffdd27f2b8789b44b39b756db81c444a944260 (patch) | |
| tree | 14c359ffe1b498dfcab3b156268ca67939c512b0 | |
| parent | 6459a984489e3674d4cb108c3b252525b8fd7068 (diff) | |
| download | mruby-0fffdd27f2b8789b44b39b756db81c444a944260.tar.gz mruby-0fffdd27f2b8789b44b39b756db81c444a944260.zip | |
Add test for end-of-program marker.
| -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 |
