Merge pull request #7143 from MikeMcQuaid/shell_output_assert_output
formula_assertions: print output on assertion failed.
This commit is contained in:
commit
40b4eaff05
@ -11,6 +11,9 @@ module Homebrew
|
|||||||
output = `#{cmd}`
|
output = `#{cmd}`
|
||||||
assert_equal result, $CHILD_STATUS.exitstatus
|
assert_equal result, $CHILD_STATUS.exitstatus
|
||||||
output
|
output
|
||||||
|
rescue Test::Unit::AssertionFailedError
|
||||||
|
puts output if Homebrew.args.verbose?
|
||||||
|
raise
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns the output of running the cmd with the optional input, and
|
# Returns the output of running the cmd with the optional input, and
|
||||||
@ -24,6 +27,9 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
assert_equal result, $CHILD_STATUS.exitstatus unless result.nil?
|
assert_equal result, $CHILD_STATUS.exitstatus unless result.nil?
|
||||||
output
|
output
|
||||||
|
rescue Test::Unit::AssertionFailedError
|
||||||
|
puts output if Homebrew.args.verbose?
|
||||||
|
raise
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user