test-apt-cli-update 649 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. set -e
  3. TESTDIR=$(readlink -f $(dirname $0))
  4. . $TESTDIR/framework
  5. setupenvironment
  6. configarchitecture "i386"
  7. insertpackage 'unstable' 'foo' 'all' '2.0'
  8. cp rootdir/var/lib/dpkg/status dpkg.status
  9. insertinstalledpackage 'foo' 'all' '1.0'
  10. setupaptarchive --no-update
  11. APTARCHIVE=$(readlink -f ./aptarchive)
  12. testfailureequal 'E: The update command takes no arguments' apt update -q arguments
  13. testsuccessequal "1 package can be upgraded. Run 'apt list --upgradable' to see it." apt update -q
  14. cp dpkg.status rootdir/var/lib/dpkg/status
  15. insertinstalledpackage 'foo' 'all' '2.0'
  16. testsuccessequal 'All packages are up to date.' apt update -q