summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-cli-search
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-08-30 11:29:45 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2014-09-07 19:23:28 +0200
commit859093dae7dcadaff2e15a3885a1824b0d5f5913 (patch)
tree30cc00ed3a906ef741268e6585177dbb1d2b62e6 /test/integration/test-apt-cli-search
parent9622b2111095c3fc705ec0615d27fe403e18c3b8 (diff)
support regular expressions in 'apt search'
apt-cache search supported this since ever and in the code for apt was a fixme indicating this should be added here as well, so here we go.
Diffstat (limited to 'test/integration/test-apt-cli-search')
-rwxr-xr-xtest/integration/test-apt-cli-search15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/integration/test-apt-cli-search b/test/integration/test-apt-cli-search
index 58613717b..3ac074952 100755
--- a/test/integration/test-apt-cli-search
+++ b/test/integration/test-apt-cli-search
@@ -33,16 +33,31 @@ foo/unstable 1.0 all
testequal "foo/unstable 1.0 all
$DESCR
" apt search -qq xxyyzz
+testempty apt search -qq --names-only xxyyzz
+
+# search name
+testequal "foo/unstable 1.0 all
+ $DESCR
+" apt search -qq foo
+testequal "foo/unstable 1.0 all
+ $DESCR
+" apt search -qq --names-only foo
# search with multiple words is a AND search
testequal "foo/unstable 1.0 all
$DESCR
" apt search -qq aabbcc xxyyzz
+testequal "foo/unstable 1.0 all
+ $DESCR
+" apt search -qq 'a+b+c+' 'i*xxy{0,2}zz'
# search is not case-sensitive by default
testequal "foo/unstable 1.0 all
$DESCR
" apt search -qq uppercase
+testequal "foo/unstable 1.0 all
+ $DESCR
+" apt search -qq 'up[pP]erc[Aa]se'
# output is sorted and search word finds both package
testequal "bar/testing 2.0 i386