4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
8 configarchitecture "i386
"
10 DESCR='Some description that has a unusual word xxyyzz and aabbcc and a UPPERCASE'
11 DESCR2='Some other description with the unusual aabbcc only'
12 insertpackage 'unstable' 'foo' 'all' '1.0' '' '' "$DESCR
13 Long description of stuff and such
, with lines
15 and paragraphs and everything.
"
16 insertpackage 'testing' 'bar' 'i386' '2.0' '' '' "$DESCR2"
20 APTARCHIVE="$(readlink -f ./aptarchive)"
22 testfailureequal 'E: You must give at least one search pattern' aptcache search
23 testfailureequal 'E: You must give at least one search pattern' apt search
26 testsuccessequal "Sorting...
33 testsuccessequal "foo
/unstable
1.0 all
35 " apt search -qq xxyyzz
36 testempty apt search -qq --names-only xxyyzz
39 testsuccessequal "foo
/unstable
1.0 all
42 testsuccessequal "foo
/unstable
1.0 all
44 " apt search -qq --names-only foo
46 # search with multiple words is a AND search
47 testsuccessequal "foo
/unstable
1.0 all
49 " apt search -qq aabbcc xxyyzz
50 testsuccessequal "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 testsuccessequal "foo
/unstable
1.0 all
57 " apt search -qq uppercase
58 testsuccessequal "foo
/unstable
1.0 all
60 " apt search -qq 'up[pP]erc[Aa]se'
62 # search is done in the long description
63 testsuccessequal "foo
/unstable
1.0 all
65 " apt search -qq 'long description'
66 testsuccessequal "foo
/unstable
1.0 all
68 Long description of stuff and such
, with lines
70 and paragraphs and everything.
71 " apt search --full -qq 'long description'
73 # output is sorted and search word finds both package
74 testsuccessequal "bar
/testing
2.0 i386
79 " apt search -qq aabbcc