From 8428114608627fe0a08dcf1589931f6db025f0b4 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 21 Aug 2019 22:13:27 +0200 Subject: patterns: Add ?version --- test/integration/test-apt-patterns | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/integration/test-apt-patterns b/test/integration/test-apt-patterns index 92c76edd1..a78413011 100755 --- a/test/integration/test-apt-patterns +++ b/test/integration/test-apt-patterns @@ -161,6 +161,10 @@ 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 '?upgradable' +testsuccessequal "Listing... +foreign/unstable 2.0 amd64 +not-obsolete/unstable 2.0 i386 [upgradable from: 1.0]" apt list '?version(2.0)' + testsuccessequal "Package: does-not-exist State: not a real package (virtual) N: Can't select candidate version from package does-not-exist as it has no candidate -- cgit v1.2.3 From 7fa292edbe924923cc689721fe58244ca0a40bcd Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 21 Aug 2019 22:21:30 +0200 Subject: patterns: Add ?source-name and ?source-version --- test/integration/test-apt-patterns | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/integration/test-apt-patterns b/test/integration/test-apt-patterns index a78413011..c030e37ec 100755 --- a/test/integration/test-apt-patterns +++ b/test/integration/test-apt-patterns @@ -10,8 +10,8 @@ insertpackage 'unstable' 'available' 'all' '1.0' insertinstalledpackage 'manual1' 'i386' '1.0' 'Depends: automatic1' insertinstalledpackage 'manual2' 'i386' '1.0' -insertinstalledpackage 'automatic1' 'i386' '1.0' -insertinstalledpackage 'automatic2' 'i386' '1.0' +insertinstalledpackage 'automatic1' 'i386' '1.0' 'Source: automatic (0)' +insertinstalledpackage 'automatic2' 'i386' '1.0' 'Source: automatic (1)' insertinstalledpackage 'essential' 'i386' '1.0' 'Essential: yes' insertinstalledpackage 'conf-only' 'i386' '1.0' '' '' 'deinstall ok config-files' @@ -157,6 +157,13 @@ conf-only/now 1.0 i386 [residual-config] foreign/unstable 2.0 amd64 not-obsolete/unstable 2.0 i386 [upgradable from: 1.0]" apt list '?not(?obsolete)' +testsuccessequal "Listing... +automatic1/now 1.0 i386 [installed,local] +automatic2/now 1.0 i386 [installed,local]" apt list '?source-package(^automatic$)' + +testsuccessequal "Listing... +automatic2/now 1.0 i386 [installed,local]" apt list '?source-version(^1$)' + 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 '?upgradable' -- cgit v1.2.3 From 391c9f20208584bf429c7717047a0637d0d670fb Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 21 Aug 2019 22:31:01 +0200 Subject: patterns: Add ?archive --- test/integration/test-apt-patterns | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') diff --git a/test/integration/test-apt-patterns b/test/integration/test-apt-patterns index c030e37ec..2fa5d336d 100755 --- a/test/integration/test-apt-patterns +++ b/test/integration/test-apt-patterns @@ -112,6 +112,11 @@ foreign/unstable 2.0 amd64" apt list '?architecture(amd64)' testsuccessequal "Listing..." apt list '?architecture(foreign)' testsuccessequal "Listing..." apt list '?architecture(native)' +testsuccessequal "Listing... +available/unstable 1.0 all +foreign/unstable 2.0 amd64 +not-obsolete/unstable 2.0 i386 [upgradable from: 1.0]" apt list '?archive(^unstable$)' + testsuccessequal "Listing... automatic1/now 1.0 i386 [installed,local] automatic2/now 1.0 i386 [installed,local]" apt list '?automatic' -- cgit v1.2.3 From 02b0afd5098534eff34a8fa1d44454c7a3e1ff09 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 21 Aug 2019 22:53:25 +0200 Subject: patterns: Add ?origin --- test/integration/test-apt-patterns | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/integration/test-apt-patterns b/test/integration/test-apt-patterns index 2fa5d336d..c0b0c18d0 100755 --- a/test/integration/test-apt-patterns +++ b/test/integration/test-apt-patterns @@ -22,6 +22,7 @@ insertpackage 'unstable' 'not-obsolete' 'all' '2.0' insertpackage 'unstable' 'foreign' 'amd64' '2.0' +getoriginfromsuite() { echo -n 'meow'; } setupaptarchive testsuccess aptmark auto automatic1 automatic2 @@ -162,6 +163,11 @@ conf-only/now 1.0 i386 [residual-config] foreign/unstable 2.0 amd64 not-obsolete/unstable 2.0 i386 [upgradable from: 1.0]" apt list '?not(?obsolete)' +testsuccessequal "Listing... +available/unstable 1.0 all +foreign/unstable 2.0 amd64 +not-obsolete/unstable 2.0 i386 [upgradable from: 1.0]" apt list '?origin(^meow$)' + testsuccessequal "Listing... automatic1/now 1.0 i386 [installed,local] automatic2/now 1.0 i386 [installed,local]" apt list '?source-package(^automatic$)' -- cgit v1.2.3 From 6801e6d2c63d4ff087024fc84a0feb8aef86886b Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 26 Nov 2019 11:34:34 +0100 Subject: patterns: Add ?any-version --- test/integration/test-apt-patterns | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test') diff --git a/test/integration/test-apt-patterns b/test/integration/test-apt-patterns index c0b0c18d0..767fd22b1 100755 --- a/test/integration/test-apt-patterns +++ b/test/integration/test-apt-patterns @@ -104,6 +104,20 @@ testsuccessequal "Listing... automatic1/now 1.0 i386 [installed,local]" apt list '?and(?name(^automatic),?name(1$))' +msgmsg "Narrow and friends" +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 '?and(?version(^1\.0$),?version(^2\.0$))' + +testsuccessequal "Listing..." apt list '?any-version(?and(?version(^1\.0$),?version(^2\.0$)))' + +# XXX FIXME: I guess we do want this to only show version 1.0? +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 '?any-version(?and(?version(^1\.0$),?name(not-obsolete)))' + + + msgmsg "Package patterns" testsuccessequal "Listing... -- cgit v1.2.3 From 94b185bb738e063bcc387e31b39dcd041f283766 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 26 Nov 2019 11:45:44 +0100 Subject: patterns: Implement ?narrow(...), as ?any-version(?and(...)) This is pure syntactic sugar - ?narrow does not exist in the abstract syntax. --- test/integration/test-apt-patterns | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/integration/test-apt-patterns b/test/integration/test-apt-patterns index 767fd22b1..291aad1d4 100755 --- a/test/integration/test-apt-patterns +++ b/test/integration/test-apt-patterns @@ -110,11 +110,15 @@ 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 '?and(?version(^1\.0$),?version(^2\.0$))' testsuccessequal "Listing..." apt list '?any-version(?and(?version(^1\.0$),?version(^2\.0$)))' +testsuccessequal "Listing..." apt list '?narrow(?version(^1\.0$),?version(^2\.0$))' # XXX FIXME: I guess we do want this to only show version 1.0? 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 '?any-version(?and(?version(^1\.0$),?name(not-obsolete)))' +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 '?narrow(?version(^1\.0$),?name(not-obsolete))' -- cgit v1.2.3 From 96f795bce665a1907b885bd2d57d6ab22b0a4199 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 26 Nov 2019 11:56:28 +0100 Subject: patterns: Add ?all-versions --- test/integration/test-apt-patterns | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test') diff --git a/test/integration/test-apt-patterns b/test/integration/test-apt-patterns index 291aad1d4..f726d0576 100755 --- a/test/integration/test-apt-patterns +++ b/test/integration/test-apt-patterns @@ -121,6 +121,9 @@ 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 '?narrow(?version(^1\.0$),?name(not-obsolete))' +testsuccessequal "Listing... +foreign/unstable 2.0 amd64 +not-obsolete/unstable 2.0 i386 [upgradable from: 1.0]" apt list '?not(?all-versions(?version(^1)))' msgmsg "Package patterns" -- cgit v1.2.3 From a93b4443c18ee211691f7b336b161fea7d1df699 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 26 Nov 2019 12:01:42 +0100 Subject: patterns: Add ?section --- test/integration/test-apt-patterns | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/integration/test-apt-patterns b/test/integration/test-apt-patterns index f726d0576..06c552479 100755 --- a/test/integration/test-apt-patterns +++ b/test/integration/test-apt-patterns @@ -5,7 +5,7 @@ TESTDIR="$(readlink -f "$(dirname "$0")")" setupenvironment configarchitecture 'i386' 'amd64' -insertpackage 'unstable' 'available' 'all' '1.0' +insertpackage 'unstable' 'available' 'all' '1.0' 'Section: asection' insertinstalledpackage 'manual1' 'i386' '1.0' 'Depends: automatic1' insertinstalledpackage 'manual2' 'i386' '1.0' @@ -13,7 +13,8 @@ insertinstalledpackage 'manual2' 'i386' '1.0' insertinstalledpackage 'automatic1' 'i386' '1.0' 'Source: automatic (0)' insertinstalledpackage 'automatic2' 'i386' '1.0' 'Source: automatic (1)' -insertinstalledpackage 'essential' 'i386' '1.0' 'Essential: yes' +insertinstalledpackage 'essential' 'i386' '1.0' 'Essential: yes +Section: asection' insertinstalledpackage 'conf-only' 'i386' '1.0' '' '' 'deinstall ok config-files' insertinstalledpackage 'broken' 'i386' '1.0' 'Depends: does-not-exist' @@ -189,6 +190,10 @@ available/unstable 1.0 all foreign/unstable 2.0 amd64 not-obsolete/unstable 2.0 i386 [upgradable from: 1.0]" apt list '?origin(^meow$)' +testsuccessequal "Listing... +available/unstable 1.0 all +essential/now 1.0 i386 [installed,local]" apt list '?section(asection)' + testsuccessequal "Listing... automatic1/now 1.0 i386 [installed,local] automatic2/now 1.0 i386 [installed,local]" apt list '?source-package(^automatic$)' -- cgit v1.2.3