diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:19:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:19:27 +0000 |
commit | e0023883c6d2e6745a19e4b48e186ed156c1fca8 (patch) | |
tree | 1a48b8056ec984385d0d862b683535d04d6ed215 /src/tests/man-deleted-directory | |
parent | Initial commit. (diff) | |
download | man-db-upstream.tar.xz man-db-upstream.zip |
Adding upstream version 2.11.2.upstream/2.11.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | src/tests/man-deleted-directory | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/tests/man-deleted-directory b/src/tests/man-deleted-directory new file mode 100755 index 0000000..f2bad68 --- /dev/null +++ b/src/tests/man-deleted-directory @@ -0,0 +1,26 @@ +#! /bin/sh + +# Test that man can run from a deleted directory. +# https://bugs.debian.org/764384 + +: "${srcdir=.}" +# shellcheck source-path=SCRIPTDIR +. "$srcdir/testlib.sh" + +: "${MAN=man}" + +init +echo "MANDATORY_MANPATH $abstmpdir/usr/share/man" >"$tmpdir/manpath.config" +MANPATH="$abstmpdir/usr/share/man" +export MANPATH + +write_page test 1 "$tmpdir/usr/share/man/man1/test.1" \ + UTF-8 '' '' 'test \- test' +mkdir "$tmpdir/zombie" +cd "$tmpdir/zombie" || exit 1 +rmdir "$abstmpdir/zombie" || \ + skip "can't remove current working directory on this system" +run $MAN -C "$abstmpdir/manpath.config" test >/dev/null +report 'run from deleted directory' "$?" + +finish |