test-apt-cli-update 614 B

1234567891011121314151617181920212223
  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. testfailuremsg 'E: The update command takes no arguments' apt update arguments
  12. testsuccessequal "1 package can be upgraded. Run 'apt list --upgradable' to see it." apt update -qq
  13. cp dpkg.status rootdir/var/lib/dpkg/status
  14. insertinstalledpackage 'foo' 'all' '2.0'
  15. testsuccessequal 'All packages are up to date.' apt update -qq