]>
git.saurik.com Git - apt.git/blob - test/integration/test-apt-cli-search
4 TESTDIR
=$(readlink -f $(dirname $0))
8 configarchitecture
"i386"
10 if [ ! -x ${BUILDDIRECTORY}/apt
]; then
11 msgmsg
"No ${BUILDDIRECTORY}/apt"
16 DESCR
='Some description that has a unusual word xxyyzz and aabbcc and a UPPERCASE'
17 DESCR2
='Some other description with the unusual aabbcc only'
18 insertpackage
'unstable' 'foo' 'all' '1.0' '' '' "$DESCR
19 Long description of stuff and such, with lines
21 and paragraphs and everything."
22 insertpackage
'testing' 'bar' 'i386' '2.0' '' '' "$DESCR2"
26 APTARCHIVE
=$(readlink -f ./aptarchive)
28 testequal
'E: You must give at least one search pattern' aptcache search
29 testequal
'E: You must give at least one search pattern' apt search
39 testequal
"foo/unstable 1.0 all
41 " apt search
-qq xxyyzz
42 testempty apt search
-qq --names-only xxyyzz
45 testequal
"foo/unstable 1.0 all
48 testequal
"foo/unstable 1.0 all
50 " apt search
-qq --names-only foo
52 # search with multiple words is a AND search
53 testequal
"foo/unstable 1.0 all
55 " apt search
-qq aabbcc xxyyzz
56 testequal
"foo/unstable 1.0 all
58 " apt search
-qq 'a+b+c+' 'i*xxy{0,2}zz'
60 # search is not case-sensitive by default
61 testequal
"foo/unstable 1.0 all
63 " apt search
-qq uppercase
64 testequal
"foo/unstable 1.0 all
66 " apt search
-qq 'up[pP]erc[Aa]se'
68 # search is done in the long description
69 testequal
"foo/unstable 1.0 all
71 " apt search
-qq 'long description'
72 testequal
"foo/unstable 1.0 all
74 Long description of stuff and such, with lines
76 and paragraphs and everything.
77 " apt search
--full -qq 'long description'
79 # output is sorted and search word finds both package
80 testequal
"bar/testing 2.0 i386
85 " apt search
-qq aabbcc