mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-25 01:34:34 +03:00
tests: Ensure we quote grep pattern
Otherwise we fail if the pattern starts with -
This commit is contained in:
parent
134283afbf
commit
a287274935
@ -55,7 +55,7 @@ assert_not_has_file () {
|
||||
}
|
||||
|
||||
assert_file_has_content () {
|
||||
if ! grep -q "$2" "$1"; then
|
||||
if ! grep -q -e "$2" "$1"; then
|
||||
echo 1>&2 "File '$1' doesn't match regexp '$2'"; exit 1
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user