From 76e2632459410dec81337edb6a9fee33c9a660f3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 11:59:37 +0200 Subject: Adding upstream version 2.7.12. Signed-off-by: Daniel Baumann --- test/integration/test-dpkg-path | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 test/integration/test-dpkg-path (limited to 'test/integration/test-dpkg-path') diff --git a/test/integration/test-dpkg-path b/test/integration/test-dpkg-path new file mode 100755 index 0000000..b17b594 --- /dev/null +++ b/test/integration/test-dpkg-path @@ -0,0 +1,35 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" + +setupenvironment +configarchitecture 'native' +configdpkgnoopchroot + +# create a bunch of test pkgs +createtestpkg() { + setupsimplenativepackage "testpkg-$1" 'native' '1.0' 'unstable' + BUILDDIR="incoming/testpkg-$1-1.0" + echo '#!/bin/sh +echo PATH=$PATH' > "${BUILDDIR}/debian/preinst" + buildpackage "$BUILDDIR" 'unstable' 'main' 'native' + rm -rf "$BUILDDIR" +} + +createtestpkg 'one' +createtestpkg 'two' + +setupaptarchive + + +# Inherit from environment +testsuccess aptget install testpkg-one -y -o DPkg::Path="" +cp rootdir/tmp/testsuccess.output apt.log +testsuccess grep "PATH=$PATH" apt.log + +# Set a custom value +testsuccess aptget install testpkg-two -y -o DPkg::Path="foobar:$PATH" +cp rootdir/tmp/testsuccess.output apt.log +testsuccess grep "PATH=foobar:$PATH" apt.log -- cgit v1.2.3