]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-cli-search
apt-inst: Do not try to create a substring of an empty string in error reporting
[apt.git] / test / integration / test-apt-cli-search
CommitLineData
1bef0dd5
MV
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6
7setupenvironment
8configarchitecture "i386"
9
3c74988b
MV
10if [ ! -x ${BUILDDIRECTORY}/apt ]; then
11 msgmsg "No ${BUILDDIRECTORY}/apt"
12 msgskip
13 exit 0
14fi
15
1bef0dd5
MV
16DESCR='Some description that has a unusual word xxyyzz and aabbcc'
17DESCR2='Some other description with the unusual aabbcc only'
18insertpackage 'unstable' 'foo' 'all' '1.0' '' '' "$DESCR"
19insertpackage 'testing' 'bar' 'i386' '2.0' '' '' "$DESCR2"
20
21setupaptarchive
22
23APTARCHIVE=$(readlink -f ./aptarchive)
24
25# with OP progress
26testequal "Sorting...
27Full Text Search...
28foo/unstable 1.0 all
29 $DESCR
30" apt search xxyyzz
31
32# without op progress
33testequal "foo/unstable 1.0 all
34 $DESCR
35" apt search -qq xxyyzz
36
37# search with multiple words is a AND search
38testequal "foo/unstable 1.0 all
39 $DESCR
40" apt search -qq aabbcc xxyyzz
41
42# output is sorted and search word finds both package
43testequal "bar/testing 2.0 i386
44 $DESCR2
45
46foo/unstable 1.0 all
47 $DESCR
48" apt search -qq aabbcc