chiark / gitweb /
test suite: default dsc distro config setting: Move to lib.
[dgit.git] / tests / tests / protocol-compat
index b1b902549fa9238a6a5a53c8ef432600dceee080..59e8d6515b128ed8cfd4ab1b05e682400bfb2633 100755 (executable)
@@ -11,14 +11,14 @@ prep () {
 }
 
 check () {
-       rm -rf $p.cloned
+       pd=$p.$suite
        t-refs-same-start
 
        t-archive-none $p
        t-archive-query $suite
 
-       t-dgit clone $p $suite $p.cloned
-       cd $p.cloned
+       t-dgit clone $p $suite $pd
+       cd $pd
        t-ref-head
 
        $1
@@ -30,9 +30,9 @@ check () {
 
 reset () {
        cd ..
-       rm -rf $p.cloned
-       mkdir $p.cloned
-       cd $p.cloned
+       rm -rf $pd
+       mkdir $pd
+       cd $pd
        git init
 }
 
@@ -54,7 +54,7 @@ prep
 
 perl -i~ -pe 's/^(Dgit: \w+ \S+ \S+) (.*)/$1\n $2 EXTRA/' $dscf
 
-check
+check reset
 
 : ---------- older ----------
 
@@ -64,8 +64,16 @@ prep
 
 perl -i -pe 's/^(Dgit: \w+).*/$1/' $dscf
 
-t-git-config dgit.default.old-dsc-distro test-dummy
-
 check
 
+: ---------- expect fail ----------
+
+pd=$p.fail
+
+t-git-config dgit.default.old-dsc-distro downstream
+
+t-expect-fail 'no configured url and .dsc provides no hint' \
+t-dgit clone $p $suite $pd
+
+
 t-ok