mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-09-11 11:41:14 +02:00
Ensure that assert_output_contains
receives an argument
This commit is contained in:
parent
7f1869cbcd
commit
ff2b5dc90e
1 changed files with 4 additions and 0 deletions
|
@ -115,6 +115,10 @@ assert_output() {
|
||||||
|
|
||||||
assert_output_contains() {
|
assert_output_contains() {
|
||||||
local expected="$1"
|
local expected="$1"
|
||||||
|
if [ -z "$expected" ]; then
|
||||||
|
echo "assert_output_contains needs an argument" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
echo "$output" | $(type -p ggrep grep | head -1) -F "$expected" >/dev/null || {
|
echo "$output" | $(type -p ggrep grep | head -1) -F "$expected" >/dev/null || {
|
||||||
{ echo "expected output to contain $expected"
|
{ echo "expected output to contain $expected"
|
||||||
echo "actual: $output"
|
echo "actual: $output"
|
||||||
|
|
Loading…
Reference in a new issue