]> git.saurik.com Git - apt.git/blob - test/integration/test-apt-cli-search
Merge remote-tracking branch 'donkult/debian/sid' into debian/sid
[apt.git] / test / integration / test-apt-cli-search
1 #!/bin/sh
2 set -e
3
4 TESTDIR=$(readlink -f $(dirname $0))
5 . $TESTDIR/framework
6
7 setupenvironment
8 configarchitecture "i386"
9
10 DESCR='Some description that has a unusual word xxyyzz and aabbcc'
11 DESCR2='Some other description with the unusual aabbcc only'
12 insertpackage 'unstable' 'foo' 'all' '1.0' '' '' "$DESCR"
13 insertpackage 'testing' 'bar' 'i386' '2.0' '' '' "$DESCR2"
14
15 setupaptarchive
16
17 APTARCHIVE=$(readlink -f ./aptarchive)
18
19 # with OP progress
20 testequal "Sorting...
21 Full Text Search...
22 foo/unstable 1.0 all
23 $DESCR
24 " apt search xxyyzz
25
26 # without op progress
27 testequal "foo/unstable 1.0 all
28 $DESCR
29 " apt search -qq xxyyzz
30
31 # search with multiple words is a AND search
32 testequal "foo/unstable 1.0 all
33 $DESCR
34 " apt search -qq aabbcc xxyyzz
35
36 # output is sorted and search word finds both package
37 testequal "bar/testing 2.0 i386
38 $DESCR2
39
40 foo/unstable 1.0 all
41 $DESCR
42 " apt search -qq aabbcc