summaryrefslogtreecommitdiff
path: root/tests/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/lib b/tests/lib
index 03c25ce..5b93d98 100644
--- a/tests/lib
+++ b/tests/lib
@@ -74,15 +74,22 @@ t-expect-fail () {
t-expect-push-fail () {
local mpat="$1"; shift
+
+ local triedpush=`git rev-parse HEAD`
+
t-reporefs pre-push
t-expect-fail "$mpat" "$@"
t-reporefs post-push
diff $tmp/show-refs.{pre,post}-push
+ t-git-objects-not-present '' $triedpush
+
eval "$t_expect_push_fail_hook"
}
t-git-objects-not-present () {
+ # t-git-objects-not-present GITDIR|'' OBJID [...]
+ # specifying '' means the repo for package $p
local gitdir="${1-$tmp/git/$p.git}"
local obj
if ! [ -e "$gitdir" ]; then return; fi