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.
 
 
 
 
 
 

37 lines
1.5 KiB

  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'amd64'
  7. testsuccess aptconfig dump
  8. testsuccessequal 'APT::Architecture "amd64";' aptconfig dump APT::Architecture
  9. testempty aptconfig dump config::which::does::not::exist
  10. testsuccessequal 'APT::Architectures "";
  11. APT::Architectures:: "amd64";' aptconfig dump APT::Architectures
  12. testsuccessequal 'APT::Architectures:: "amd64";' aptconfig dump --no-empty APT::Architectures
  13. testsuccessequal 'amd64' aptconfig dump --no-empty --format='%v%n' APT::Architectures
  14. testempty aptconfig shell
  15. testfailureequal 'E: Arguments not in pairs' aptconfig shell APT::Architecture
  16. testempty aptconfig shell APT::Architecture ARCH # incorrect order
  17. testsuccessequal "ARCH='amd64'" aptconfig shell ARCH APT::Architecture
  18. ROOTDIR="$(readlink -f rootdir)"
  19. testsuccessequal "CONFIG='apt.conf'" aptconfig shell CONFIG Dir::Etc::main
  20. testsuccessequal "CONFIG='${ROOTDIR}/etc/apt/apt.conf'" aptconfig shell CONFIG Dir::Etc::main/f
  21. testsuccessequal "CONFIG='etc/apt/'" aptconfig shell CONFIG Dir::Etc
  22. testsuccessequal "CONFIG='${ROOTDIR}/etc/apt/'" aptconfig shell CONFIG Dir::Etc/ # old style
  23. testsuccessequal "CONFIG='${ROOTDIR}/etc/apt/'" aptconfig shell CONFIG Dir::Etc/d
  24. testempty aptconfig dump --no-empty --format='%v%n' APT::Build-Profiles
  25. export DEB_BUILD_PROFILES='nodoc stage1'
  26. testsuccessequal 'nodoc
  27. stage1' aptconfig dump --no-empty --format='%v%n' APT::Build-Profiles
  28. unset DEB_BUILD_PROFILES
  29. testempty aptconfig dump --no-empty --format='%v%n' APT::Build-Profiles