diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 10:49:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 10:49:50 +0000 |
commit | 74b60c5712f2a84904b95d008953c140a9bd5dd2 (patch) | |
tree | dd12cc58c6d4cfb5e2c1183f47757295ce3b5662 /src/tests/man-exact-section-matches | |
parent | Initial commit. (diff) | |
download | man-db-74b60c5712f2a84904b95d008953c140a9bd5dd2.tar.xz man-db-74b60c5712f2a84904b95d008953c140a9bd5dd2.zip |
Adding upstream version 2.9.4.upstream/2.9.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tests/man-exact-section-matches')
-rwxr-xr-x | src/tests/man-exact-section-matches | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/tests/man-exact-section-matches b/src/tests/man-exact-section-matches new file mode 100755 index 0000000..d2bac98 --- /dev/null +++ b/src/tests/man-exact-section-matches @@ -0,0 +1,41 @@ +#! /bin/sh + +# Test for: +# https://bugzilla.redhat.com/show_bug.cgi?id=684977 + +: ${srcdir=.} +. "$srcdir/testlib.sh" + +case $MANDIR_LAYOUT in + ""|GNU) + ;; + *) + skip "only applicable to GNU layout" + ;; +esac + +: ${MAN=man} + +init +fake_config /usr/share/man +MANPATH="$tmpdir/usr/share/man" +export MANPATH + +# Force default section order. +cat >>"$tmpdir/manpath.config" <<EOF +SECTION 1 n l 8 3 0 2 5 4 9 6 7 +EOF + +write_page md5sum 3pm "$tmpdir/usr/share/man/man3/open.3pm.gz" \ + UTF-8 gz '' 'open \- section 3pm' +write_page md5sum 3p "$tmpdir/usr/share/man/man3p/open.3p.gz" \ + UTF-8 gz '' 'open \- section 3p' +cat >"$tmpdir/1.exp" <<EOF +$abstmpdir/usr/share/man/man3p/open.3p.gz +$abstmpdir/usr/share/man/man3/open.3pm.gz +EOF +run $MAN -C "$tmpdir/manpath.config" -aw 3p open >"$tmpdir/1.out" +expect_pass 'exact section matches win' \ + 'diff -u "$tmpdir/1.exp" "$tmpdir/1.out"' + +finish |