chiark / gitweb /
test suite: protocol-compat: Soup it up a lot
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 8 Jan 2017 23:32:00 +0000 (23:32 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 9 Jan 2017 02:20:09 +0000 (02:20 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/tests/protocol-compat

index eb017d2..b1b9025 100755 (executable)
@@ -11,23 +11,55 @@ prep () {
 }
 
 check () {
+       rm -rf $p.cloned
+       t-refs-same-start
+
        t-archive-none $p
        t-archive-query $suite
 
-       t-dgit clone $p stable $p.cloned
+       t-dgit clone $p $suite $p.cloned
        cd $p.cloned
        t-ref-head
 
+       $1
+
        t-dgit import-dsc $dscf +imported
        t-ref-same refs/heads/imported
        cd ..
 }
 
+reset () {
+       cd ..
+       rm -rf $p.cloned
+       mkdir $p.cloned
+       cd $p.cloned
+       git init
+}
+
+: ---------- newer ----------
+
+suite=sid
+v=2.1
+prep
+
+perl -i~ -pe 's/^Dgit: .*/$& EXTRA DATA\n TO BE IGNORED/' $dscf
+
+check reset
+
+: ---------- newline ----------
+
+suite=testing
+v=2.0
+prep
+
+perl -i~ -pe 's/^(Dgit: \w+ \S+ \S+) (.*)/$1\n $2 EXTRA/' $dscf
+
+check
+
 : ---------- older ----------
 
 suite=stable
 v=1.2
-
 prep
 
 perl -i -pe 's/^(Dgit: \w+).*/$1/' $dscf