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.
 
 
 
 
 
 

67 lines
1.8 KiB

  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'i386' 'amd64'
  7. DESCR='Some description
  8. That has multiple lines'
  9. insertpackage 'unstable' 'foo' 'all' '1.0' '' '' "$DESCR"
  10. insertpackage 'unstable' 'bar' 'i386,amd64' '1' '' '' "$DESCR"
  11. insertinstalledpackage 'foo' 'all' '1.0'
  12. setupaptarchive
  13. APTARCHIVE=$(readlink -f ./aptarchive)
  14. # note that we do not display Description-md5 with the "apt" cmd
  15. # and also show some additional fields that are calculated
  16. testsuccessequal "Package: foo
  17. Version: 1.0
  18. Priority: optional
  19. Section: other
  20. Maintainer: Joe Sixpack <joe@example.org>
  21. Installed-Size: 43.0 kB
  22. Download-Size: unknown
  23. APT-Manual-Installed: yes
  24. APT-Sources: file:$APTARCHIVE unstable/main all Packages
  25. Description: Some description
  26. That has multiple lines
  27. " apt show foo
  28. testsuccessequal "Package: bar
  29. Version: 1
  30. Priority: optional
  31. Section: other
  32. Maintainer: Joe Sixpack <joe@example.org>
  33. Installed-Size: 43.0 kB
  34. Download-Size: unknown
  35. APT-Sources: file:$APTARCHIVE unstable/main i386 Packages
  36. Description: Some description
  37. That has multiple lines
  38. " apt show bar
  39. testsuccessequal "Package: bar:amd64
  40. Version: 1
  41. Priority: optional
  42. Section: other
  43. Maintainer: Joe Sixpack <joe@example.org>
  44. Installed-Size: 43.0 kB
  45. Download-Size: unknown
  46. APT-Sources: file:$APTARCHIVE unstable/main amd64 Packages
  47. Description: Some description
  48. That has multiple lines
  49. " apt show bar:amd64
  50. # this is the default, but disabled by the testcases
  51. testsuccess apt show foo -o Apt::Cmd::Disable-Script-Warning=0
  52. cp rootdir/tmp/testsuccess.output aptshow.output
  53. testsuccess grep '^WARNING: ' aptshow.output
  54. if [ "$(id -u)" != '0' ]; then
  55. testsuccess apt install foo -s -o APT::Get::Show-User-Simulation-Note=1
  56. cp rootdir/tmp/testsuccess.output aptshow.output
  57. testsuccess grep '^NOTE: ' aptshow.output
  58. fi