X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Flib;h=b9ce24be192486df55ee2da1ef064f03ace208d7;hp=94c4c7969ba0702e5a3bd6ff03beef9ee3ad683b;hb=d064fe28e62e45dca47b9925eac285e7b7becc5d;hpb=c4ed4e776fe57b77e1f4c2194a8377b09690ec04;ds=sidebyside diff --git a/tests/lib b/tests/lib index 94c4c796..b9ce24be 100644 --- a/tests/lib +++ b/tests/lib @@ -131,9 +131,10 @@ t-refs-notexist () { } t-pushed-good () { + local branch=$1 t-ref-dsc-dgit t-refs-same-more \ - refs/heads/master \ + refs/heads/$branch \ refs/tags/debian/$v \ refs/remotes/dgit/dgit/sid t-refs-notexist \ @@ -158,3 +159,10 @@ t-ref-dsc-dgit () { print $ref,"\n"; ' <$tmp/incoming/${p}_${v}.dsc >$tmp/t.ref1 } + +t-apply-diff () { + local v1=$1 + local v2=$2 + (cd $troot/pkg-srcs; debdiff ${p}_${v1}.dsc ${p}_${v2}.dsc) \ + | patch -p1 -u +}