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.
 
 
 
 
 
 

33 lines
596 B

  1. #!/bin/sh
  2. set -e
  3. TESTDIR=$(readlink -f $(dirname $0))
  4. . $TESTDIR/framework
  5. setupenvironment
  6. configarchitecture 'i386'
  7. insertinstalledpackage 'bar' 'i386' '1.0'
  8. cat > rootdir/etc/apt/preferences << EOF
  9. # random test comment header
  10. # commented out by puppy^Wpuppet
  11. #Package: foo
  12. #Pin: origin "ftp.debian.org"
  13. #Pin: 800
  14. Package: bar
  15. Pin: version 1.0
  16. Pin-Priority: 700
  17. #Package: bar
  18. #Pin: version 1.0
  19. #Pin: 800
  20. EOF
  21. testequal "Reading package lists...
  22. Building dependency tree..." aptget check
  23. msgtest "Ensure policy is applied"
  24. aptcache policy bar|grep -q "*** 1.0 700" && msgpass || msgfail