Skip to content

Commit

Permalink
fix generated mtest
Browse files Browse the repository at this point in the history
mtest doesn't always return a nonzero status code, so we need to check
the output for failure conditions.
  • Loading branch information
hone committed Aug 18, 2015
1 parent 03b56f7 commit 53eacfb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions bintest/mruby-cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@

output, status = Open3.capture2("rake test:mtest")
assert_true status.success?, "Process did not exit cleanly"
assert_false output.include?("Error:"), "mtest has errors"
assert_false output.include?("Failure:"), "mtest has failures"
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion mrblib/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test
<<TEST
class Test#{Util.camelize(@name)} < MTest::Unit::TestCase
def test_main
assert_nil __main__
assert_nil __main__([])
end
end
Expand Down

0 comments on commit 53eacfb

Please sign in to comment.