]>
Commit | Line | Data |
---|---|---|
1bef0dd5 MV |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | ||
7 | setupenvironment | |
8 | configarchitecture "i386" | |
9 | ||
3c74988b MV |
10 | if [ ! -x ${BUILDDIRECTORY}/apt ]; then |
11 | msgmsg "No ${BUILDDIRECTORY}/apt" | |
12 | msgskip | |
13 | exit 0 | |
14 | fi | |
15 | ||
01837669 | 16 | DESCR='Some description that has a unusual word xxyyzz and aabbcc and a UPPERCASE' |
1bef0dd5 MV |
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" | |
20 | ||
21 | setupaptarchive | |
22 | ||
23 | APTARCHIVE=$(readlink -f ./aptarchive) | |
24 | ||
25 | # with OP progress | |
26 | testequal "Sorting... | |
27 | Full Text Search... | |
28 | foo/unstable 1.0 all | |
29 | $DESCR | |
30 | " apt search xxyyzz | |
31 | ||
32 | # without op progress | |
33 | testequal "foo/unstable 1.0 all | |
34 | $DESCR | |
35 | " apt search -qq xxyyzz | |
36 | ||
37 | # search with multiple words is a AND search | |
38 | testequal "foo/unstable 1.0 all | |
39 | $DESCR | |
40 | " apt search -qq aabbcc xxyyzz | |
41 | ||
01837669 MV |
42 | # search is not case-sensitive by default |
43 | testequal "foo/unstable 1.0 all | |
44 | $DESCR | |
45 | " apt search -qq uppercase | |
46 | ||
1bef0dd5 MV |
47 | # output is sorted and search word finds both package |
48 | testequal "bar/testing 2.0 i386 | |
49 | $DESCR2 | |
50 | ||
51 | foo/unstable 1.0 all | |
52 | $DESCR | |
53 | " apt search -qq aabbcc |