summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/librechroot-test.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/librechroot-test.sh b/test/librechroot-test.sh
index ae5dd4b..f8dd2ba 100644
--- a/test/librechroot-test.sh
+++ b/test/librechroot-test.sh
@@ -52,6 +52,20 @@ it_disables_networking_when_requested() {
! testsudo librechroot -l "$roundup_test_name" -N run curl https://repo.parabolagnulinux.org/ >/dev/null
}
+it_handles_CHROOTEXTRAPKG_correctly() {
+ requuire network sudo || return 0
+ libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty
+
+ ! testsudo librechroot -l "$roundup_test_name" run lsof
+ echo "CHROOTEXTRAPKG=(lsof)" >> "$XDG_CONFIG_HOME"/libretools/chroot.conf
+ testsudo librechroot -l "$roundup_test_name" install-name lsof
+ testsudo librechroot -l "$roundup_test_name" clean-pkgs
+ testsudo librechroot -l "$roundup_test_name" run lsof
+ echo "CHROOTEXTRAPKG=()" >> "$XDG_CONFIG_HOME"/libretools/chroot.conf
+ testsudo librechroot -l "$roundup_test_name" clean-pkgs
+ ! testsudo librechroot -l "$roundup_test_name" run lsof
+}
+
it_displays_help_as_normal_user() {
rm -rf "$XDG_CONFIG_HOME"
LC_ALL=C librechroot help >$tmpdir/stdout 2>$tmpdir/stderr