You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

41 lines
1.1 KiB

  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. touch aptarchive/apt_1.5~rc1.tar.xz
  7. cat >> aptarchive/apt_1.5~rc1.dsc << EOF
  8. Format: 3.0 (native)
  9. Source: apt
  10. Binary: apt
  11. Architecture: any all
  12. Version: 1.5~rc1
  13. Build-Depends: foo
  14. Package-List:
  15. apt deb admin important arch=any
  16. Checksums-Sha1:
  17. 332b354b0c7cbd936a4a95f3ce149aa03677cabf 2095076 apt_1.5~rc1.tar.xz
  18. Checksums-Sha256:
  19. 14d09b2c1e13f9a70aac3322987ff26f36c53010639763573c9aa4987e52e47a 2095076 apt_1.5~rc1.tar.xz
  20. Checksums-Sha512:
  21. 4f570c10c3fd549b2e27db4481fbc1ebebed52bd06a8ba7c0716b3917a8452bb3d3cd4fbb02561e02af09b1973a65a4cc69a42c21e858b1d5c3caa970aea4fd4 2095076 apt_1.5~rc1.tar.xz
  22. Files:
  23. 7ea24e77b6203e08ca4158831df26825 2095076 apt_1.5~rc1.tar.xz
  24. EOF
  25. rm rootdir/etc/apt/apt.conf.d/*
  26. for HASH in MD5 SHA1 SHA256 SHA512; do
  27. testsuccess aptftparchive -qq sources -o APT::FTPArchive::$HASH=false "aptarchive/"
  28. cp rootdir/tmp/testsuccess.output aptarchive/Sources
  29. if [ "$HASH" = "MD5" ]; then
  30. testfailure grep "Files:" aptarchive/Sources
  31. else
  32. testfailure grep -i "$HASH:" aptarchive/Sources
  33. fi
  34. done