aboutsummaryrefslogtreecommitdiff
path: root/bpkg/system-package-manager-debian.test.testscript
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/system-package-manager-debian.test.testscript')
-rw-r--r--bpkg/system-package-manager-debian.test.testscript169
1 files changed, 169 insertions, 0 deletions
diff --git a/bpkg/system-package-manager-debian.test.testscript b/bpkg/system-package-manager-debian.test.testscript
new file mode 100644
index 0000000..290919f
--- /dev/null
+++ b/bpkg/system-package-manager-debian.test.testscript
@@ -0,0 +1,169 @@
+# file : bpkg/host-os-release.test.testscript
+# license : MIT; see accompanying LICENSE file
+
+: apt-cache-policy
+:
+{
+ test.arguments += apt-cache-policy
+
+ : basics
+ :
+ $* libssl3 libssl1.1 libssl-dev libsqlite5 libxerces-c-dev <<EOI 2>>EOE >>EOO
+ libssl3:
+ Installed: 3.0.7-1
+ Candidate: 3.0.7-2
+ Version table:
+ 3.0.7-2 500
+ 500 http://deb.debian.org/debian bookworm/main amd64 Packages
+ *** 3.0.7-1 100
+ 100 /var/lib/dpkg/status
+ libssl1.1:
+ Installed: 1.1.1n-0+deb11u3
+ Candidate: 1.1.1n-0+deb11u3
+ Version table:
+ *** 1.1.1n-0+deb11u3 100
+ 100 /var/lib/dpkg/status
+ libssl-dev:
+ Installed: 3.0.7-1
+ Candidate: 3.0.7-2
+ Version table:
+ 3.0.7-2 500
+ 500 http://deb.debian.org/debian bookworm/main amd64 Packages
+ *** 3.0.7-1 100
+ 100 /var/lib/dpkg/status
+ libxerces-c-dev:
+ Installed: (none)
+ Candidate: 3.2.4+debian-1
+ Version table:
+ 3.2.4+debian-1 500
+ 500 http://deb.debian.org/debian bookworm/main amd64 Packages
+ EOI
+ LC_ALL=C apt-cache policy --quiet libssl3 libssl1.1 libssl-dev libsqlite5 libxerces-c-dev
+ EOE
+ libssl3 '3.0.7-1' '3.0.7-2'
+ libssl1.1 '1.1.1n-0+deb11u3' '1.1.1n-0+deb11u3'
+ libssl-dev '3.0.7-1' '3.0.7-2'
+ libsqlite5 '' ''
+ libxerces-c-dev '' '3.2.4+debian-1'
+ EOO
+
+ : empty
+ :
+ $* libsqlite5 <:'' 2>>EOE >>EOO
+ LC_ALL=C apt-cache policy --quiet libsqlite5
+ EOE
+ libsqlite5 '' ''
+ EOO
+
+ : none-none
+ :
+ $* pulseaudio <<EOI 2>>EOE >>EOO
+ pulseaudio:
+ Installed: (none)
+ Candidate: (none)
+ Version table:
+ 1:11.1-1ubuntu7.5 -1
+ 500 http://au.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
+ 1:11.1-1ubuntu7 -1
+ 500 http://au.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
+ EOI
+ LC_ALL=C apt-cache policy --quiet pulseaudio
+ EOE
+ pulseaudio '' ''
+ EOO
+}
+
+: apt-cache-show
+:
+{
+ test.arguments += apt-cache-show
+
+ # Note: put Depends last to test folded/multiline parsing.
+ #
+ : basics
+ :
+ $* libssl1.1 1.1.1n-0+deb11u3 <<EOI 2>>EOE >>EOO
+ Package: libssl1.1
+ Status: install ok installed
+ Priority: optional
+ Section: libs
+ Installed-Size: 4120
+ Maintainer: Debian OpenSSL Team <pkg-openssl-devel@lists.alioth.debian.org>
+ Architecture: amd64
+ Multi-Arch: same
+ Source: openssl
+ Version: 1.1.1n-0+deb11u3
+ Breaks: isync (<< 1.3.0-2), lighttpd (<< 1.4.49-2), python-boto (<< 2.44.0-1.1), python-httplib2 (<< 0.11.3-1), python-imaplib2 (<< 2.57-5), python3-boto (<< 2.44.0-1.1), python3-imaplib2 (<< 2.57-5)
+ Description: Secure Sockets Layer toolkit - shared libraries
+ This package is part of the OpenSSL project's implementation of the SSL
+ and TLS cryptographic protocols for secure communication over the
+ Internet.
+ .
+ It provides the libssl and libcrypto shared libraries.
+ Description-md5: 88547c6206c7fbc4fcc7d09ce100d210
+ Homepage: https://www.openssl.org/
+ Depends: libc6 (>= 2.25), debconf (>= 0.5) | debconf-2.0
+
+ EOI
+ LC_ALL=C apt-cache show --quiet libssl1.1=1.1.1n-0+deb11u3
+ EOE
+ libc6 (>= 2.25), debconf (>= 0.5) | debconf-2.0
+ EOO
+
+ : no-depends
+ :
+ $* libssl1.1 1.1.1n-0+deb11u3 <<EOI 2>>EOE >''
+ Package: libssl1.1
+ Status: install ok installed
+ Priority: optional
+ Section: libs
+ Installed-Size: 4120
+ Maintainer: Debian OpenSSL Team <pkg-openssl-devel@lists.alioth.debian.org>
+ Architecture: amd64
+ Multi-Arch: same
+ Source: openssl
+ Version: 1.1.1n-0+deb11u3
+ Breaks: isync (<< 1.3.0-2), lighttpd (<< 1.4.49-2), python-boto (<< 2.44.0-1.1), python-httplib2 (<< 0.11.3-1), python-imaplib2 (<< 2.57-5), python3-boto (<< 2.44.0-1.1), python3-imaplib2 (<< 2.57-5)
+ Description: Secure Sockets Layer toolkit - shared libraries
+ This package is part of the OpenSSL project's implementation of the SSL
+ and TLS cryptographic protocols for secure communication over the
+ Internet.
+ .
+ It provides the libssl and libcrypto shared libraries.
+ Description-md5: 88547c6206c7fbc4fcc7d09ce100d210
+ Homepage: https://www.openssl.org/
+
+ EOI
+ LC_ALL=C apt-cache show --quiet libssl1.1=1.1.1n-0+deb11u3
+ EOE
+}
+
+: main-from-dev
+:
+{
+ test.arguments += main-from-dev
+
+ : first
+ :
+ $* libssl-dev 3.0.7-1 <<EOI >'libssl3'
+ libssl3 (= 3.0.7-1), debconf (>= 0.5) | debconf-2.0
+ EOI
+
+ : not-first
+ :
+ $* libxerces-c-dev 3.2.4+debian-1 <<EOI >'libxerces-c3.2'
+ libc6-dev | libc-dev, libicu-dev, libxerces-c3.2 (= 3.2.4+debian-1)
+ EOI
+
+ : exact
+ :
+ $* libexpat1-dev 2.5.0-1 <<EOI >'libexpat1'
+ libexpat1 (= 2.5.0-1), libc6-dev | libc-dev
+ EOI
+
+ : not-stem
+ :
+ $* libcurl4-openssl-dev 7.87.0-2 <<EOI >''
+ libcurl4 (= 7.87.0-2)
+ EOI
+}