chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changelog: finalise 2.12
[dgit.git]
/
tests
/
tests
/
push-newpackage
diff --git
a/tests/tests/push-newpackage
b/tests/tests/push-newpackage
index 2d016572316059d588c3ed4877e2d50e56b88c2b..d0f3f35a40d9927af72afb01fd3aa5c729836046 100755
(executable)
--- a/
tests/tests/push-newpackage
+++ b/
tests/tests/push-newpackage
@@
-2,23
+2,29
@@
set -e
. tests/lib
set -e
. tests/lib
-t-archive-none pari-extra
-t-git-none
-t-worktree 3-1
-v=3-1
-cd $p
-git-branch -m dgit/sid master
-git-remote rm dgit
+t-prep-newpackage pari-extra 3-1
-LANG=C t-dgit push 2>&1 \
- | tee /dev/stderr \
- | grep 'package appears to be new in this suite' >/dev/null
+cd $p
+t-refs-same-start
+t-ref-head
-echo y
+t-expect-push-fail 'package appears to be new in this suite' \
+t-dgit push
t-dgit build
t-dgit build
+
+git checkout bogus
+
+set +e
+(set -e; DGIT_TEST_DEBUG=' ' t-dgit push --new)
+rc=$?
+set -e
+if [ $rc = 0 ]; then fail "push succeeded when tree mismatch"; fi
+
+git checkout master
+
t-dgit push --new
t-dgit push --new
-t-pushed-good
+t-pushed-good
master
echo ok.
echo ok.