chiark / gitweb /
Test suite: break out t-prep-newpackage (nfc)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Apr 2015 14:56:47 +0000 (15:56 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 31 May 2015 10:54:05 +0000 (11:54 +0100)
tests/lib
tests/tests/push-newpackage

index 1516646f23ae1d239be725cb0ccf468afa8ca00f..939aa6c6e24fa525c7a55f399c5777d6b75fc3c2 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -81,7 +81,20 @@ t-has-ancestor () {
        if [ x$mbase != x$ancestor ]; then
                fail "not ff $ancestor..$now, $mbase != $ancestor"
        fi
-}      
+}
+
+t-prep-newpackage () {
+       p=$1
+       v=$2
+       t-archive-none $p
+       t-git-none
+       v=3-1
+       t-worktree $v
+       cd $p
+       git branch -m dgit/sid master
+       git remote rm dgit
+       cd ..
+}
 
 t-archive-none () {
        p=$1
index 9954b3fc9fb424cc9a763fc795bced4743812210..5d23faa8312cfaeba869a5ea7d50a57da1aa8fb5 100755 (executable)
@@ -2,14 +2,9 @@
 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
 
+cd $p
 t-refs-same-start
 t-ref-head