Skip to content

Commit 53eacfb

Browse files
committed
fix generated mtest
mtest doesn't always return a nonzero status code, so we need to check the output for failure conditions.
1 parent 03b56f7 commit 53eacfb

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

bintest/mruby-cli.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040

4141
output, status = Open3.capture2("rake test:mtest")
4242
assert_true status.success?, "Process did not exit cleanly"
43+
assert_false output.include?("Error:"), "mtest has errors"
44+
assert_false output.include?("Failure:"), "mtest has failures"
4345
end
4446
end
4547
end

mrblib/setup.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def test
6363
<<TEST
6464
class Test#{Util.camelize(@name)} < MTest::Unit::TestCase
6565
def test_main
66-
assert_nil __main__
66+
assert_nil __main__([])
6767
end
6868
end
6969

0 commit comments

Comments
 (0)