test-apt-cli-search 894 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/bin/sh
  2. set -e
  3. TESTDIR=$(readlink -f $(dirname $0))
  4. . $TESTDIR/framework
  5. setupenvironment
  6. configarchitecture "i386"
  7. DESCR='Some description that has a unusual word xxyyzz and aabbcc'
  8. DESCR2='Some other description with the unusual aabbcc only'
  9. insertpackage 'unstable' 'foo' 'all' '1.0' '' '' "$DESCR"
  10. insertpackage 'testing' 'bar' 'i386' '2.0' '' '' "$DESCR2"
  11. setupaptarchive
  12. APTARCHIVE=$(readlink -f ./aptarchive)
  13. # with OP progress
  14. testequal "Sorting...
  15. Full Text Search...
  16. foo/unstable 1.0 all
  17. $DESCR
  18. " apt search xxyyzz
  19. # without op progress
  20. testequal "foo/unstable 1.0 all
  21. $DESCR
  22. " apt search -qq xxyyzz
  23. # search with multiple words is a AND search
  24. testequal "foo/unstable 1.0 all
  25. $DESCR
  26. " apt search -qq aabbcc xxyyzz
  27. # output is sorted and search word finds both package
  28. testequal "bar/testing 2.0 i386
  29. $DESCR2
  30. foo/unstable 1.0 all
  31. $DESCR
  32. " apt search -qq aabbcc