test-changelog 783 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. set -e
  3. TESTDIR=$(readlink -f $(dirname $0))
  4. . $TESTDIR/framework
  5. setupenvironment
  6. configarchitecture "i386"
  7. # this will be valid until ubuntu lucid is EOL (04/2015)
  8. pkgchangelogtest="Package: apt
  9. Architecture: i386
  10. Version: 0.7.25.3ubuntu7
  11. Filename: pool/main/a/apt/apt_0.7.25.3ubuntu7_i386.deb
  12. Section: admin
  13. "
  14. cat <<-EOF >aptarchive/Packages
  15. $pkgchangelogtest
  16. EOF
  17. setupaptarchive
  18. echo "Apt::Changelogs::Server \"http://changelogs.ubuntu.com/\";" >> ./aptconfig.conf
  19. msgnmsg "apt-get changelog: "
  20. aptget changelog apt -qq > downloaded-changelog
  21. expected="apt (0.7.25.3ubuntu7) lucid; urgency=low"
  22. got="$(head -n1 downloaded-changelog)"
  23. if [ -s downloaded-changelog ] && [ "$got" = "$expected" ]; then
  24. msgpass
  25. else
  26. msgfail
  27. msgwarn "$got != $expected"
  28. fi