]>
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 insertpackage
'testing' 'bar' 'i386' '2.0' '' '' "$DESCR2"
23 APTARCHIVE
=$(readlink -f ./aptarchive)
33 testequal
"foo/unstable 1.0 all
35 " apt search
-qq xxyyzz
36 testempty apt search
-qq --names-only xxyyzz
39 testequal
"foo/unstable 1.0 all
42 testequal
"foo/unstable 1.0 all
44 " apt search
-qq --names-only foo
46 # search with multiple words is a AND search
47 testequal
"foo/unstable 1.0 all
49 " apt search
-qq aabbcc xxyyzz
50 testequal
"foo/unstable 1.0 all
52 " apt search
-qq 'a+b+c+' 'i*xxy{0,2}zz'
54 # search is not case-sensitive by default
55 testequal
"foo/unstable 1.0 all
57 " apt search
-qq uppercase
58 testequal
"foo/unstable 1.0 all
60 " apt search
-qq 'up[pP]erc[Aa]se'
62 # output is sorted and search word finds both package
63 testequal
"bar/testing 2.0 i386
68 " apt search
-qq aabbcc