blob: ef24716031b01c30a4b6a842ed6b6a2b44057712 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#! /bin/sh
# Test for invalid DB entry.
# https://bugzilla.redhat.com/show_bug.cgi?id=841431
: "${srcdir=.}"
# shellcheck source-path=SCRIPTDIR
. "$srcdir/testlib.sh"
: "${MAN=man}"
: "${MANDB=mandb}"
init
fake_config /usr/share/man
MANPATH="$tmpdir/usr/share/man"
export MANPATH
MAN_TEST_DISABLE_UNDOCUMENTED=1
export MAN_TEST_DISABLE_UNDOCUMENTED
write_page test 1 "$tmpdir/usr/share/man/man1/test.1" \
UTF-8 '' '' 'test \- top-level test page'
run $MANDB -C "$tmpdir/manpath.config" -u -q "$tmpdir/usr/share/man"
rm -f "$tmpdir/usr/share/man/man1/test.1"
echo "No manual entry for test" > "$tmpdir/1.exp"
LC_ALL=C run $MAN -C "$tmpdir/manpath.config" test 2> "$tmpdir/1.out"
expect_files_equal 'invalid DB entry' "$tmpdir/1.exp" "$tmpdir/1.out"
finish
|