chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5339e3c
)
Test suite: Break out t-grep-mpat (nfc)
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 11 Jul 2015 12:41:57 +0000
(13:41 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 11 Jul 2015 12:48:43 +0000
(13:48 +0100)
tests/lib
patch
|
blob
|
history
diff --git
a/tests/lib
b/tests/lib
index 7cd8062cae3c7d1b6671832bce1197a9d35a587a..118c497115e9f1ac96198a6c7b392653215cc394 100644
(file)
--- a/
tests/lib
+++ b/
tests/lib
@@
-58,6
+58,13
@@
t-expect-fail () {
*) fail "tee failed" ;;
esac
*) 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]:*)
local grepper=fgrep
case "$mpat" in
[A-Z]:*)
@@
-70,8
+77,8
@@
t-expect-fail () {
;;
esac
;;
esac
- $grepper -e "$mpat"
$tmp/t.output
||
- fail "
error
message not found"
+ $grepper -e "$mpat"
"$file"
||
+ fail "message not found"
}
t-expect-push-fail () {
}
t-expect-push-fail () {