From a2872749354e91b67661908f909e2e0128c78d74 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sun, 18 Dec 2011 17:35:30 -0500 Subject: [PATCH] tests: Ensure we quote grep pattern Otherwise we fail if the pattern starts with - --- tests/libtest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libtest.sh b/tests/libtest.sh index 04e206bf..b6e57a1e 100644 --- a/tests/libtest.sh +++ b/tests/libtest.sh @@ -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 }