[ostree] tests: Ensure we quote grep pattern
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] tests: Ensure we quote grep pattern
- Date: Sun, 18 Dec 2011 22:39:00 +0000 (UTC)
commit a2872749354e91b67661908f909e2e0128c78d74
Author: Colin Walters <walters verbum org>
Date: Sun Dec 18 17:35:30 2011 -0500
tests: Ensure we quote grep pattern
Otherwise we fail if the pattern starts with -
tests/libtest.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/tests/libtest.sh b/tests/libtest.sh
index 04e206b..b6e57a1 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
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]