summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-patterns
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2020-05-04 12:10:50 +0000
committerJulian Andres Klode <jak@debian.org>2020-05-04 12:10:50 +0000
commit2265697c83faa308408cbf7d78b10317228ebad6 (patch)
tree9cce30181fd90f11bba30579072bf9b689dba664 /test/integration/test-apt-patterns
parent6e6a9331e6d27d371844ec98775619328526f33d (diff)
parentc4f85bcb8bee1b5e647c7e629f616cffc7d12bbc (diff)
Merge branch 'pu/wildcards' into 'master'
Reinstate * wildcards See merge request apt-team/apt!118
Diffstat (limited to 'test/integration/test-apt-patterns')
-rwxr-xr-xtest/integration/test-apt-patterns34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/integration/test-apt-patterns b/test/integration/test-apt-patterns
index b55caf35b..33df21d36 100755
--- a/test/integration/test-apt-patterns
+++ b/test/integration/test-apt-patterns
@@ -233,3 +233,37 @@ testsuccessequal "Listing..." apt list '?x-name-fnmatch(1)'
testsuccessequal "Listing...
automatic1/now 1.0 i386 [installed,local]
manual1/now 1.0 i386 [installed,local]" apt list '?x-name-fnmatch(*1)'
+
+
+# * wildcards should still work
+testsuccessequal "Listing...
+automatic1/now 1.0 i386 [installed,local]
+automatic2/now 1.0 i386 [installed,local]" apt list 'automatic*'
+
+testfailureequal "Reading package lists...
+Building dependency tree...
+Reading state information...
+Note, selecting 'automatic1' for glob 'automatic*'
+Note, selecting 'automatic2' for glob 'automatic*'
+automatic1 is already the newest version (1.0).
+automatic1 set to manually installed.
+automatic2 is already the newest version (1.0).
+automatic2 set to manually installed.
+You might want to run 'apt --fix-broken install' to correct these.
+The following packages have unmet dependencies:
+ broken : Depends: does-not-exist but it is not installable
+E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution)." apt install -s 'automatic*'
+
+# other wildcards should fail
+
+testfailureequal "Listing...
+E: input:0-10: error: Expected pattern
+ automatic?
+ ^^^^^^^^^^" apt list 'automatic?'
+
+
+
+testfailureequal "Reading package lists...
+Building dependency tree...
+Reading state information...
+E: Unable to locate package automatic?" apt install -s 'automatic?'