summaryrefslogtreecommitdiffstats
path: root/tests/t-provides-self
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 09:40:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 09:40:31 +0000
commitb86570f63e533abcbcb97c2572e0e5732a96307b (patch)
treecabc83be691530ae685c45a8bc7620ccc0e1ebdf /tests/t-provides-self
parentInitial commit. (diff)
downloaddpkg-b86570f63e533abcbcb97c2572e0e5732a96307b.tar.xz
dpkg-b86570f63e533abcbcb97c2572e0e5732a96307b.zip
Adding upstream version 1.20.13.upstream/1.20.13upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/t-provides-self')
-rw-r--r--tests/t-provides-self/Makefile281
-rw-r--r--tests/t-provides-self/pkg-breaks-eq/DEBIAN/control8
-rw-r--r--tests/t-provides-self/pkg-breaks-ge/DEBIAN/control8
-rw-r--r--tests/t-provides-self/pkg-breaks-le/DEBIAN/control8
-rw-r--r--tests/t-provides-self/pkg-breaks/DEBIAN/control8
-rw-r--r--tests/t-provides-self/pkg-conflicts-eq/DEBIAN/control8
-rw-r--r--tests/t-provides-self/pkg-conflicts-ge/DEBIAN/control8
-rw-r--r--tests/t-provides-self/pkg-conflicts-le/DEBIAN/control8
-rw-r--r--tests/t-provides-self/pkg-conflicts/DEBIAN/control8
-rw-r--r--tests/t-provides-self/pkg-depends-eq/DEBIAN/control8
-rw-r--r--tests/t-provides-self/pkg-depends-ge/DEBIAN/control8
-rw-r--r--tests/t-provides-self/pkg-depends-le/DEBIAN/control8
-rw-r--r--tests/t-provides-self/pkg-depends/DEBIAN/control8
-rw-r--r--tests/t-provides-self/pkg-predepends-eq/DEBIAN/control8
-rw-r--r--tests/t-provides-self/pkg-predepends-ge/DEBIAN/control8
-rw-r--r--tests/t-provides-self/pkg-predepends-le/DEBIAN/control8
-rw-r--r--tests/t-provides-self/pkg-predepends/DEBIAN/control8
-rw-r--r--tests/t-provides-self/pkg-provides-10-20/DEBIAN/control8
-rw-r--r--tests/t-provides-self/pkg-provides-10/DEBIAN/control8
-rw-r--r--tests/t-provides-self/pkg-provides-20/DEBIAN/control8
-rw-r--r--tests/t-provides-self/pkg-provides/DEBIAN/control8
21 files changed, 441 insertions, 0 deletions
diff --git a/tests/t-provides-self/Makefile b/tests/t-provides-self/Makefile
new file mode 100644
index 0000000..caa6886
--- /dev/null
+++ b/tests/t-provides-self/Makefile
@@ -0,0 +1,281 @@
+TESTS_DEB := \
+ pkg-provides pkg-provides-10 pkg-provides-20 pkg-provides-10-20 \
+ pkg-depends pkg-depends-eq pkg-depends-le pkg-depends-ge \
+ pkg-predepends pkg-predepends-eq pkg-predepends-le pkg-predepends-ge \
+ pkg-breaks pkg-breaks-eq pkg-breaks-le pkg-breaks-ge \
+ pkg-conflicts pkg-conflicts-eq pkg-conflicts-le pkg-conflicts-ge
+
+include ../Test.mk
+
+define PURGE_DEPENDS
+$(DPKG_PURGE) pkg-depends
+$(DPKG_PURGE) pkg-depends-le
+$(DPKG_PURGE) pkg-depends-eq
+$(DPKG_PURGE) pkg-depends-ge
+endef
+
+test-depends:
+ # The provided dependency is not present, fail
+ ! $(DPKG_INSTALL) pkg-depends.deb
+ ! $(DPKG_INSTALL) pkg-depends-eq.deb
+ ! $(DPKG_INSTALL) pkg-depends-le.deb
+ ! $(DPKG_INSTALL) pkg-depends-ge.deb
+
+ # Install the providing package (versionless)
+ $(DPKG_INSTALL) pkg-provides.deb
+ $(DPKG_INSTALL) pkg-depends.deb
+ ! $(DPKG_INSTALL) pkg-depends-eq.deb
+ ! $(DPKG_INSTALL) pkg-depends-le.deb
+ ! $(DPKG_INSTALL) pkg-depends-ge.deb
+ # Upgrade the providing package (versionless)
+ $(DPKG_INSTALL) pkg-provides.deb
+ ! $(DPKG_PURGE) pkg-provides
+
+ $(PURGE_DEPENDS)
+
+ # Install the providing package (pkg-provides 10)
+ $(DPKG_INSTALL) pkg-provides-10.deb
+ $(DPKG_INSTALL) pkg-depends.deb
+ $(DPKG_INSTALL) pkg-depends-le.deb
+ ! $(DPKG_INSTALL) pkg-depends-eq.deb
+ ! $(DPKG_INSTALL) pkg-depends-ge.deb
+ # Upgrade the providing package (pkg-provides 10)
+ $(DPKG_INSTALL) pkg-provides-10.deb
+
+ $(PURGE_DEPENDS)
+
+ # Install the providing package (pkg-provides 20)
+ $(DPKG_INSTALL) pkg-provides-20.deb
+ $(DPKG_INSTALL) pkg-depends.deb
+ $(DPKG_INSTALL) pkg-depends-eq.deb
+ ! $(DPKG_INSTALL) pkg-depends-le.deb
+ $(DPKG_INSTALL) pkg-depends-ge.deb
+ # Upgrade the providing package (pkg-provides 20)
+ $(DPKG_INSTALL) pkg-provides-20.deb
+
+ $(PURGE_DEPENDS)
+
+ # Install the providing package (pkg-provides 10 && 20)
+ $(DPKG_INSTALL) pkg-provides-10-20.deb
+ $(DPKG_INSTALL) pkg-depends.deb
+ $(DPKG_INSTALL) pkg-depends-eq.deb
+ $(DPKG_INSTALL) pkg-depends-le.deb
+ $(DPKG_INSTALL) pkg-depends-ge.deb
+ # Upgrade the providing package (pkg-provides 10 && 20)
+ $(DPKG_INSTALL) pkg-provides-10-20.deb
+
+ $(PURGE_DEPENDS)
+
+ # The provided dependency is removed, pass
+ $(DPKG_PURGE) pkg-provides
+
+define PURGE_PREDEPENDS
+$(DPKG_PURGE) pkg-predepends
+$(DPKG_PURGE) pkg-predepends-le
+$(DPKG_PURGE) pkg-predepends-eq
+$(DPKG_PURGE) pkg-predepends-ge
+endef
+
+test-predepends:
+ # The provided predependency is not present, fail
+ ! $(DPKG_UNPACK) pkg-predepends.deb
+ ! $(DPKG_UNPACK) pkg-predepends-eq.deb
+ ! $(DPKG_UNPACK) pkg-predepends-le.deb
+ ! $(DPKG_UNPACK) pkg-predepends-ge.deb
+
+ # Install the providing package (versionless)
+ $(DPKG_INSTALL) pkg-provides.deb
+ $(DPKG_UNPACK) pkg-predepends.deb
+ ! $(DPKG_UNPACK) pkg-predepends-eq.deb
+ ! $(DPKG_UNPACK) pkg-predepends-le.deb
+ ! $(DPKG_UNPACK) pkg-predepends-ge.deb
+ # Upgrade the providing package (versionless)
+ $(DPKG_INSTALL) pkg-provides.deb
+ ! $(DPKG_PURGE) pkg-provides
+
+ $(PURGE_PREDEPENDS)
+
+ # Install the providing package (pkg-provides 10)
+ $(DPKG_INSTALL) pkg-provides-10.deb
+ $(DPKG_UNPACK) pkg-predepends.deb
+ $(DPKG_UNPACK) pkg-predepends-le.deb
+ ! $(DPKG_UNPACK) pkg-predepends-eq.deb
+ ! $(DPKG_UNPACK) pkg-predepends-ge.deb
+ # Upgrade the providing package (pkg-provides 10)
+ $(DPKG_INSTALL) pkg-provides-10.deb
+
+ $(PURGE_PREDEPENDS)
+
+ # Install the providing package (pkg-provides 20)
+ $(DPKG_INSTALL) pkg-provides-20.deb
+ $(DPKG_UNPACK) pkg-predepends.deb
+ $(DPKG_UNPACK) pkg-predepends-eq.deb
+ ! $(DPKG_UNPACK) pkg-predepends-le.deb
+ $(DPKG_UNPACK) pkg-predepends-ge.deb
+ # Upgrade the providing package (pkg-provides 20)
+ $(DPKG_INSTALL) pkg-provides-20.deb
+
+ $(PURGE_PREDEPENDS)
+
+ # Install the providing package (pkg-provides 10 && 20)
+ $(DPKG_INSTALL) pkg-provides-10-20.deb
+ $(DPKG_UNPACK) pkg-predepends.deb
+ $(DPKG_UNPACK) pkg-predepends-eq.deb
+ $(DPKG_UNPACK) pkg-predepends-le.deb
+ $(DPKG_UNPACK) pkg-predepends-ge.deb
+ # Upgrade the providing package (pkg-provides 10 && 20)
+ $(DPKG_INSTALL) pkg-provides-10-20.deb
+
+ $(PURGE_PREDEPENDS)
+
+ # The provided predependency is removed, pass
+ $(DPKG_PURGE) pkg-provides
+
+define PURGE_BREAKS
+$(DPKG_PURGE) pkg-breaks
+$(DPKG_PURGE) pkg-breaks-le
+$(DPKG_PURGE) pkg-breaks-eq
+$(DPKG_PURGE) pkg-breaks-ge
+endef
+
+test-breaks:
+ # The provided dependency is not present, pass
+ $(DPKG_INSTALL) pkg-breaks.deb
+ $(DPKG_INSTALL) pkg-breaks-eq.deb
+ $(DPKG_INSTALL) pkg-breaks-le.deb
+ $(DPKG_INSTALL) pkg-breaks-ge.deb
+
+ $(PURGE_BREAKS)
+
+ # Install the providing package (versionless)
+ $(DPKG_INSTALL) pkg-provides.deb
+ ! $(DPKG_INSTALL) pkg-breaks.deb
+ $(DPKG_INSTALL) pkg-breaks-eq.deb
+ $(DPKG_INSTALL) pkg-breaks-le.deb
+ $(DPKG_INSTALL) pkg-breaks-ge.deb
+ # Upgrade the providing package (versionless)
+ $(DPKG_INSTALL) pkg-provides.deb
+ $(DPKG_PURGE) pkg-provides
+
+ $(PURGE_BREAKS)
+
+ # Install the providing package (pkg-provides 10)
+ $(DPKG_INSTALL) pkg-provides-10.deb
+ ! $(DPKG_INSTALL) pkg-breaks.deb
+ ! $(DPKG_INSTALL) pkg-breaks-le.deb
+ $(DPKG_INSTALL) pkg-breaks-eq.deb
+ $(DPKG_INSTALL) pkg-breaks-ge.deb
+ # Upgrade the providing package (pkg-provides 10)
+ $(DPKG_INSTALL) pkg-provides-10.deb
+
+ $(PURGE_BREAKS)
+
+ # Install the providing package (pkg-provides 20)
+ $(DPKG_INSTALL) pkg-provides-20.deb
+ ! $(DPKG_INSTALL) pkg-breaks.deb
+ ! $(DPKG_INSTALL) pkg-breaks-eq.deb
+ $(DPKG_INSTALL) pkg-breaks-le.deb
+ ! $(DPKG_INSTALL) pkg-breaks-ge.deb
+ # Upgrade the providing package (pkg-provides 20)
+ $(DPKG_INSTALL) pkg-provides-20.deb
+
+ $(PURGE_BREAKS)
+
+ # Install the providing package (pkg-provides 10 && 20)
+ $(DPKG_INSTALL) pkg-provides-10-20.deb
+ ! $(DPKG_INSTALL) pkg-breaks.deb
+ ! $(DPKG_INSTALL) pkg-breaks-eq.deb
+ ! $(DPKG_INSTALL) pkg-breaks-le.deb
+ ! $(DPKG_INSTALL) pkg-breaks-ge.deb
+ # Upgrade the providing package (pkg-provides 10 && 20)
+ $(DPKG_INSTALL) pkg-provides-10-20.deb
+
+ $(PURGE_BREAKS)
+
+ # The provided dependency is removed, pass
+ $(DPKG_PURGE) pkg-provides
+
+define PURGE_CONFLICTS
+$(DPKG_PURGE) pkg-conflicts
+$(DPKG_PURGE) pkg-conflicts-le
+$(DPKG_PURGE) pkg-conflicts-eq
+$(DPKG_PURGE) pkg-conflicts-ge
+endef
+
+test-conflicts:
+ # The provided predependency is not present, fail
+ $(DPKG_UNPACK) pkg-conflicts.deb
+ $(DPKG_UNPACK) pkg-conflicts-eq.deb
+ $(DPKG_UNPACK) pkg-conflicts-le.deb
+ $(DPKG_UNPACK) pkg-conflicts-ge.deb
+
+ $(PURGE_CONFLICTS)
+
+ # Install the providing package (versionless)
+ $(DPKG_INSTALL) pkg-provides.deb
+ ! $(DPKG_UNPACK) pkg-conflicts.deb
+ $(DPKG_UNPACK) pkg-conflicts-eq.deb
+ $(DPKG_UNPACK) pkg-conflicts-le.deb
+ $(DPKG_UNPACK) pkg-conflicts-ge.deb
+ # Upgrade the providing package (pkg-provides versionless)
+ $(DPKG_INSTALL) pkg-provides.deb
+ $(DPKG_PURGE) pkg-provides
+
+ $(PURGE_CONFLICTS)
+
+ # Install the providing package (pkg-provides 10)
+ $(DPKG_INSTALL) pkg-provides-10.deb
+ ! $(DPKG_UNPACK) pkg-conflicts.deb
+ ! $(DPKG_UNPACK) pkg-conflicts-le.deb
+ $(DPKG_UNPACK) pkg-conflicts-eq.deb
+ $(DPKG_UNPACK) pkg-conflicts-ge.deb
+ # Upgrade the providing package (pkg-provides 10)
+ $(DPKG_INSTALL) pkg-provides-10.deb
+
+ $(PURGE_CONFLICTS)
+
+ # Install the providing package (pkg-provides 20)
+ $(DPKG_INSTALL) pkg-provides-20.deb
+ ! $(DPKG_UNPACK) pkg-conflicts.deb
+ ! $(DPKG_UNPACK) pkg-conflicts-eq.deb
+ $(DPKG_UNPACK) pkg-conflicts-le.deb
+ ! $(DPKG_UNPACK) pkg-conflicts-ge.deb
+ # Upgrade the providing package (pkg-provides 20)
+ $(DPKG_INSTALL) pkg-provides-20.deb
+
+ $(PURGE_CONFLICTS)
+
+ # Install the providing package (pkg-provides 10 && 20)
+ $(DPKG_INSTALL) pkg-provides-10-20.deb
+ ! $(DPKG_UNPACK) pkg-conflicts.deb
+ ! $(DPKG_UNPACK) pkg-conflicts-eq.deb
+ ! $(DPKG_UNPACK) pkg-conflicts-le.deb
+ ! $(DPKG_UNPACK) pkg-conflicts-ge.deb
+ # Upgrade the providing package (pkg-provides 10 && 20)
+ $(DPKG_INSTALL) pkg-provides-10-20.deb
+
+ $(PURGE_CONFLICTS)
+
+ # The provided predependency is removed, pass
+ $(DPKG_PURGE) pkg-provides
+
+test-case: test-depends test-predepends test-breaks test-conflicts
+
+test-clean:
+ -$(DPKG_PURGE) pkg-depends
+ -$(DPKG_PURGE) pkg-depends-eq
+ -$(DPKG_PURGE) pkg-depends-ge
+ -$(DPKG_PURGE) pkg-depends-le
+ -$(DPKG_PURGE) pkg-predepends
+ -$(DPKG_PURGE) pkg-predepends-eq
+ -$(DPKG_PURGE) pkg-predepends-ge
+ -$(DPKG_PURGE) pkg-predepends-le
+ -$(DPKG_PURGE) pkg-breaks
+ -$(DPKG_PURGE) pkg-breaks-eq
+ -$(DPKG_PURGE) pkg-breaks-ge
+ -$(DPKG_PURGE) pkg-breaks-le
+ -$(DPKG_PURGE) pkg-conflicts
+ -$(DPKG_PURGE) pkg-conflicts-eq
+ -$(DPKG_PURGE) pkg-conflicts-ge
+ -$(DPKG_PURGE) pkg-conflicts-le
+ -$(DPKG_PURGE) pkg-provides
diff --git a/tests/t-provides-self/pkg-breaks-eq/DEBIAN/control b/tests/t-provides-self/pkg-breaks-eq/DEBIAN/control
new file mode 100644
index 0000000..b6a6edd
--- /dev/null
+++ b/tests/t-provides-self/pkg-breaks-eq/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-breaks-eq
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Breaks: pkg-provides (= 20)
+Description: test package - package breaking on a virtual package
diff --git a/tests/t-provides-self/pkg-breaks-ge/DEBIAN/control b/tests/t-provides-self/pkg-breaks-ge/DEBIAN/control
new file mode 100644
index 0000000..223d00c
--- /dev/null
+++ b/tests/t-provides-self/pkg-breaks-ge/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-breaks-ge
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Breaks: pkg-provides (>= 20)
+Description: test package - package breaking on a virtual package
diff --git a/tests/t-provides-self/pkg-breaks-le/DEBIAN/control b/tests/t-provides-self/pkg-breaks-le/DEBIAN/control
new file mode 100644
index 0000000..3326245
--- /dev/null
+++ b/tests/t-provides-self/pkg-breaks-le/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-breaks-le
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Breaks: pkg-provides (<= 10)
+Description: test package - package breaking on a virtual package
diff --git a/tests/t-provides-self/pkg-breaks/DEBIAN/control b/tests/t-provides-self/pkg-breaks/DEBIAN/control
new file mode 100644
index 0000000..188486f
--- /dev/null
+++ b/tests/t-provides-self/pkg-breaks/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-breaks
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Breaks: pkg-provides
+Description: test package - package breaking on a virtual package
diff --git a/tests/t-provides-self/pkg-conflicts-eq/DEBIAN/control b/tests/t-provides-self/pkg-conflicts-eq/DEBIAN/control
new file mode 100644
index 0000000..0ad703c
--- /dev/null
+++ b/tests/t-provides-self/pkg-conflicts-eq/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-conflicts-eq
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Conflicts: pkg-provides (= 20)
+Description: test package - package conflicting on a virtual package
diff --git a/tests/t-provides-self/pkg-conflicts-ge/DEBIAN/control b/tests/t-provides-self/pkg-conflicts-ge/DEBIAN/control
new file mode 100644
index 0000000..cccc1d0
--- /dev/null
+++ b/tests/t-provides-self/pkg-conflicts-ge/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-conflicts-ge
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Conflicts: pkg-provides (>= 20)
+Description: test package - package conflicting on a virtual package
diff --git a/tests/t-provides-self/pkg-conflicts-le/DEBIAN/control b/tests/t-provides-self/pkg-conflicts-le/DEBIAN/control
new file mode 100644
index 0000000..e34a5c0
--- /dev/null
+++ b/tests/t-provides-self/pkg-conflicts-le/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-conflicts-le
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Conflicts: pkg-provides (<= 10)
+Description: test package - package conflicting on a virtual package
diff --git a/tests/t-provides-self/pkg-conflicts/DEBIAN/control b/tests/t-provides-self/pkg-conflicts/DEBIAN/control
new file mode 100644
index 0000000..90efe2b
--- /dev/null
+++ b/tests/t-provides-self/pkg-conflicts/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-conflicts
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Conflicts: pkg-provides
+Description: test package - package conflicting on a virtual package
diff --git a/tests/t-provides-self/pkg-depends-eq/DEBIAN/control b/tests/t-provides-self/pkg-depends-eq/DEBIAN/control
new file mode 100644
index 0000000..2266b03
--- /dev/null
+++ b/tests/t-provides-self/pkg-depends-eq/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-depends-eq
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Depends: pkg-provides (= 20)
+Description: test package - package depending on a virtual package
diff --git a/tests/t-provides-self/pkg-depends-ge/DEBIAN/control b/tests/t-provides-self/pkg-depends-ge/DEBIAN/control
new file mode 100644
index 0000000..60867d6
--- /dev/null
+++ b/tests/t-provides-self/pkg-depends-ge/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-depends-ge
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Depends: pkg-provides (>= 20)
+Description: test package - package depending on a virtual package
diff --git a/tests/t-provides-self/pkg-depends-le/DEBIAN/control b/tests/t-provides-self/pkg-depends-le/DEBIAN/control
new file mode 100644
index 0000000..45136eb
--- /dev/null
+++ b/tests/t-provides-self/pkg-depends-le/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-depends-le
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Depends: pkg-provides (<= 10)
+Description: test package - package depending on a virtual package
diff --git a/tests/t-provides-self/pkg-depends/DEBIAN/control b/tests/t-provides-self/pkg-depends/DEBIAN/control
new file mode 100644
index 0000000..d07cc45
--- /dev/null
+++ b/tests/t-provides-self/pkg-depends/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-depends
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Depends: pkg-provides
+Description: test package - package depending on a virtual package
diff --git a/tests/t-provides-self/pkg-predepends-eq/DEBIAN/control b/tests/t-provides-self/pkg-predepends-eq/DEBIAN/control
new file mode 100644
index 0000000..11e7a0a
--- /dev/null
+++ b/tests/t-provides-self/pkg-predepends-eq/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-predepends-eq
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Pre-Depends: pkg-provides (= 20)
+Description: test package - package pre-depending on a virtual package
diff --git a/tests/t-provides-self/pkg-predepends-ge/DEBIAN/control b/tests/t-provides-self/pkg-predepends-ge/DEBIAN/control
new file mode 100644
index 0000000..ff8d720
--- /dev/null
+++ b/tests/t-provides-self/pkg-predepends-ge/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-predepends-ge
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Pre-Depends: pkg-provides (>= 20)
+Description: test package - package pre-depending on a virtual package
diff --git a/tests/t-provides-self/pkg-predepends-le/DEBIAN/control b/tests/t-provides-self/pkg-predepends-le/DEBIAN/control
new file mode 100644
index 0000000..b7df6fb
--- /dev/null
+++ b/tests/t-provides-self/pkg-predepends-le/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-predepends-le
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Pre-Depends: pkg-provides (<= 10)
+Description: test package - package pre-depending on a virtual package
diff --git a/tests/t-provides-self/pkg-predepends/DEBIAN/control b/tests/t-provides-self/pkg-predepends/DEBIAN/control
new file mode 100644
index 0000000..8423965
--- /dev/null
+++ b/tests/t-provides-self/pkg-predepends/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-predepends
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Pre-Depends: pkg-provides
+Description: test package - package pre-depending on a virtual package
diff --git a/tests/t-provides-self/pkg-provides-10-20/DEBIAN/control b/tests/t-provides-self/pkg-provides-10-20/DEBIAN/control
new file mode 100644
index 0000000..37dbe97
--- /dev/null
+++ b/tests/t-provides-self/pkg-provides-10-20/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-provides
+Version: 10
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Provides: pkg-provides (= 20)
+Description: test package - package providing a versioned virtual package
diff --git a/tests/t-provides-self/pkg-provides-10/DEBIAN/control b/tests/t-provides-self/pkg-provides-10/DEBIAN/control
new file mode 100644
index 0000000..5fa91ae
--- /dev/null
+++ b/tests/t-provides-self/pkg-provides-10/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-provides
+Version: 10
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Provides: pkg-provides (= 10)
+Description: test package - package providing a versioned virtual package
diff --git a/tests/t-provides-self/pkg-provides-20/DEBIAN/control b/tests/t-provides-self/pkg-provides-20/DEBIAN/control
new file mode 100644
index 0000000..3c94af2
--- /dev/null
+++ b/tests/t-provides-self/pkg-provides-20/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-provides
+Version: 20
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Provides: pkg-provides (= 20)
+Description: test package - package providing a versioned virtual package
diff --git a/tests/t-provides-self/pkg-provides/DEBIAN/control b/tests/t-provides-self/pkg-provides/DEBIAN/control
new file mode 100644
index 0000000..865b72a
--- /dev/null
+++ b/tests/t-provides-self/pkg-provides/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-provides
+Version: 15
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Provides: pkg-provides
+Description: test package - package providing a virtual package