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/mandb-cachedir-tag | |
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/mandb-cachedir-tag | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/tests/mandb-cachedir-tag b/src/tests/mandb-cachedir-tag new file mode 100755 index 0000000..77f21b7 --- /dev/null +++ b/src/tests/mandb-cachedir-tag @@ -0,0 +1,32 @@ +#! /bin/sh + +# Don't create CACHEDIR.TAG in manpath + +: "${srcdir=.}" +# shellcheck source-path=SCRIPTDIR +. "$srcdir/testlib.sh" + +: "${MANDB=mandb}" + +init +fake_config /usr/share/man +mkdir -p "$tmpdir/usr/share/man" +mkdir -p "$tmpdir/usr/dir/man" +mkdir -p "$tmpdir/var/cache/man" +echo "MANDATORY_MANPATH $abstmpdir/usr/share/man" > "$tmpdir/manpath.config" +echo "MANDATORY_MANPATH $abstmpdir/usr/dir/man" >> "$tmpdir/manpath.config" +echo "MANDB_MAP $abstmpdir/usr/share/man $abstmpdir/var/cache/man" >> "$tmpdir/manpath.config" + +write_page test 1 "$tmpdir/usr/share/man/man1/test.1" UTF-8 '' '' \ + 'test \- simple mandb test' +write_page test2 1 "$tmpdir/usr/dir/man/man1/test2.1" UTF-8 '' '' \ + 'test2 \- simple mandb test' +run $MANDB -C "$tmpdir/manpath.config" -q "$tmpdir/usr/share/man:$tmpdir/usr/dir/man" +test -e "$tmpdir/var/cache/man/CACHEDIR.TAG" +report "CACHEDIR.TAG exists" "$?" +test ! -e "$tmpdir/usr/share/man/CACHEDIR.TAG" +report "CACHEDIR.TAG doesn't exist 01" "$?" +test ! -e "$tmpdir/usr/dir/man/CACHEDIR.TAG" +report "CACHEDIR.TAG doesn't exist 02" "$?" + +finish |