tests: Ensure we quote grep pattern

Otherwise we fail if the pattern starts with -
This commit is contained in:
Colin Walters 2011-12-18 17:35:30 -05:00
parent 134283afbf
commit a287274935

View File

@ -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
}