]>
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)
36 testequal
"foo/unstable 1.0 all
38 " apt search
-qq xxyyzz
39 testempty apt search
-qq --names-only xxyyzz
42 testequal
"foo/unstable 1.0 all
45 testequal
"foo/unstable 1.0 all
47 " apt search
-qq --names-only foo
49 # search with multiple words is a AND search
50 testequal
"foo/unstable 1.0 all
52 " apt search
-qq aabbcc xxyyzz
53 testequal
"foo/unstable 1.0 all
55 " apt search
-qq 'a+b+c+' 'i*xxy{0,2}zz'
57 # search is not case-sensitive by default
58 testequal
"foo/unstable 1.0 all
60 " apt search
-qq uppercase
61 testequal
"foo/unstable 1.0 all
63 " apt search
-qq 'up[pP]erc[Aa]se'
65 # search is done in the long description
66 testequal
"foo/unstable 1.0 all
68 " apt search
-qq 'long description'
69 testequal
"foo/unstable 1.0 all
71 Long description of stuff and such, with lines
73 and paragraphs and everything.
74 " apt search
--full -qq 'long description'
76 # output is sorted and search word finds both package
77 testequal
"bar/testing 2.0 i386
82 " apt search
-qq aabbcc