chiark / gitweb /
tests: import-dsc: Test corrupted ENV (#950446)
[dgit.git] / tests / tests / import-dsc
index b86eef63c913373b1989e815fc0784b63bb4e801..768bd8c3bc8fae0b3aa883d41a1f02b12bdeddb4 100755 (executable)
@@ -1,6 +1,7 @@
 #!/bin/bash
 set -e
 . tests/lib
+t-tstunt-parsechangelog
 
 t-setup-import examplegit
 
@@ -63,6 +64,10 @@ t-dgit import-dsc $dsc2 ..$branch
 t-dgit import-dsc $dsc2 +$branch
 check-imported $dsc2
 
+dsc3=$troot/pkg-srcs/example_1.0-1+brokenmeta.dsc
+t-dgit import-dsc $dsc3 +$branch
+check-imported $dsc3
+
 cd ..
 mkdir $p.2
 cd $p.2
@@ -71,8 +76,30 @@ git init
 
 check-import $troot/pkg-srcs 1.0-1
 
+cd ..
+v=1.0-1+absurd
+rm -f ${p}_*
+dsc=$troot/pkg-srcs/${p}_${v}.dsc
+cd $p.2
+
+cp $dsc ..
+t-expect-fail 'No such file or directory' \
+check-import .. $v
+
+mkdir ../enoents
+cp $dsc ../enoents
+t-expect-fail 'No such file or directory' \
+check-import ../enoents $v
+
+cd ..
+rm -f ${p}_${v}.dsc
+dget -du file://$dsc
+cd $p.2
+
+check-import .. $v
+
 t-expect-fail "Your git tree does not have that object" \
-check-import ../mirror/pool/main 1.2
+check-import ../mirror/pool/main 1.2 --no-chase-dsc-distro
 
 check-import ../mirror/pool/main 1.2 --force-import-dsc-with-dgit-field