chiark / gitweb /
tests/tests/quilt: Test series quiltification
[dgit.git] / tests / tests / push-newpackage
index 2d01657..9954b3f 100755 (executable)
@@ -7,18 +7,30 @@ t-git-none
 t-worktree 3-1
 v=3-1
 cd $p
-git-branch -m dgit/sid master
-git-remote rm dgit
+git branch -m dgit/sid master
+git remote rm dgit
+
+t-refs-same-start
+t-ref-head
 
 LANG=C t-dgit push 2>&1 \
        | tee /dev/stderr \
        | grep 'package appears to be new in this suite' >/dev/null
 
-echo y
-
 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-pushed-good
+t-pushed-good master
 
 echo ok.