From 9221dca64f0c8b5de72727491e41cf63e902eaab Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 03:16:24 +0200 Subject: Adding upstream version 2.8.5. Signed-off-by: Daniel Baumann --- src/tests/man-9 | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 src/tests/man-9 (limited to 'src/tests/man-9') diff --git a/src/tests/man-9 b/src/tests/man-9 new file mode 100755 index 0000000..4dc0331 --- /dev/null +++ b/src/tests/man-9 @@ -0,0 +1,46 @@ +#! /bin/sh + +# Testing override dir. This test covers both use cases - when override dir is +# enabled and when it's not. +# + +: ${srcdir=.} +. "$srcdir/testlib.sh" + +: ${MAN=man} + +if [ -n "$OVERRIDE_DIR" ]; then + OVERRIDE=$OVERRIDE_DIR +else + OVERRIDE="override" +fi + +init +fake_config /usr/share/man +mkdir -p "${tmpdir}/usr/share/man/${OVERRIDE}/man1" +MANPATH="$tmpdir/usr/share/man" +export MANPATH + + +write_page abc 1 "${tmpdir}/usr/share/man/man1/abc.1" \ + UTF-8 '' '' 'abc \- top-level test page' +write_page abc 1 "${tmpdir}/usr/share/man/${OVERRIDE}/man1/abc.1" \ + UTF-8 '' '' 'abc \- modified test page' + +if [ -n "$OVERRIDE_DIR" ]; then +cat >"$tmpdir/1.exp" <"$tmpdir/1.exp" <"$tmpdir/1.out" +expect_pass 'testing override dir' \ + 'diff -u "$tmpdir/1.exp" "$tmpdir/1.out"' + +finish -- cgit v1.2.3