summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2015-07-11 13:41:57 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2015-07-11 13:48:43 +0100
commit5ecff56dbf1b60b6b5c814b3450bf4ec37ed26d6 (patch)
tree51a9a9713d2b260cca6140833d7fedf9cc8f0fee /tests
parent5339e3c5dcc53b10ea981c106ad7211b5a701ee1 (diff)
Test suite: Break out t-grep-mpat (nfc)
Diffstat (limited to 'tests')
-rw-r--r--tests/lib11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/lib b/tests/lib
index 7cd8062..118c497 100644
--- a/tests/lib
+++ b/tests/lib
@@ -58,6 +58,13 @@ t-expect-fail () {
*) fail "tee failed" ;;
esac
+ t-grep-mpat "$mpat" $tmp/t.output
+}
+
+t-grep-mpat () {
+ local mpat="$1"
+ local file="$2"
+
local grepper=fgrep
case "$mpat" in
[A-Z]:*)
@@ -70,8 +77,8 @@ t-expect-fail () {
;;
esac
- $grepper -e "$mpat" $tmp/t.output ||
- fail "error message not found"
+ $grepper -e "$mpat" "$file" ||
+ fail "message not found"
}
t-expect-push-fail () {