summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2023-01-13 12:23:43 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2023-01-13 12:27:55 +0100
commit73f7408f6d164e595fb2e3a3df856a8f8168fcb9 (patch)
treeb2efb1ed3df668e5faa478a4fc165d2af7be922b /test
parent5919d2d18eac6e445a59da23246df94258e103eb (diff)
make ?installed pattern match installed version only when narrowed
This is the correct behavior, but it was overlooked when aptitude patterns where ported. I remember wondering about this, but I checked the aptitude code and saw a check that CurrentVer != 0 or something and then apparently did not notice another implementation for version matching.
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-apt-patterns6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/integration/test-apt-patterns b/test/integration/test-apt-patterns
index 7f202710c..85370aee8 100755
--- a/test/integration/test-apt-patterns
+++ b/test/integration/test-apt-patterns
@@ -192,6 +192,12 @@ conf-only/now 1.0 i386 [residual-config]
foreign/unstable 2.0 amd64" apt list '?not(?installed)'
testsuccessequal "Listing...
+not-obsolete/unstable 2.0 i386 [upgradable from: 1.0]
+N: There is 1 additional version. Please use the '-a' switch to see it" apt list '?installed?exact-name(not-obsolete)?version(2.0)'
+
+testsuccessequal "Listing..." apt list '?narrow(?installed?exact-name(not-obsolete)?version(2.0))'
+
+testsuccessequal "Listing...
automatic1/now 1.0 i386 [installed,local]
automatic2/now 1.0 i386 [installed,local]" apt list '?name(^automatic)'