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.
 
 
 
 
 
 

34 lines
1.2 KiB

  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'native'
  7. insertpackage 'unstable' 'foobar' 'native' '1' '' '' 'funky tool'
  8. insertpackage 'unstable' 'coolstuff' 'native' '1' '' '' 'funky tool just like foo and bar'
  9. insertpackage 'unstable' 'foo' 'native' '1' '' '' 'tool best used with bar'
  10. insertpackage 'unstable' 'bar' 'native' '1' '' '' 'tool best used with foo'
  11. insertpackage 'unstable' 'baz' 'native' '1' 'Provides: bar' '' 'alternative tool best used with foo'
  12. setupaptarchive
  13. # in this special case the following queries should be equal
  14. FOOBAR='foobar - funky tool
  15. coolstuff - funky tool just like foo and bar
  16. foo - tool best used with bar
  17. bar - tool best used with foo
  18. baz - alternative tool best used with foo'
  19. testsuccessequal "$FOOBAR" aptcache search foo
  20. testsuccessequal "$FOOBAR" aptcache search bar
  21. testsuccessequal "$FOOBAR" aptcache search foo bar
  22. testsuccessequal 'foobar - funky tool
  23. foo - tool best used with bar' aptcache search -n foo
  24. testsuccessequal 'foobar - funky tool
  25. bar - tool best used with foo
  26. baz - alternative tool best used with foo' aptcache search -n bar
  27. testsuccessequal 'foobar - funky tool' aptcache search -n foo bar