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-symlinks-with-matching-names | |
parent | Initial commit. (diff) | |
download | man-db-upstream.tar.xz man-db-upstream.zip |
Adding upstream version 2.9.4.upstream/2.9.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | src/tests/man-symlinks-with-matching-names | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/tests/man-symlinks-with-matching-names b/src/tests/man-symlinks-with-matching-names new file mode 100755 index 0000000..ff264d6 --- /dev/null +++ b/src/tests/man-symlinks-with-matching-names @@ -0,0 +1,31 @@ +#! /bin/sh + +# Test for: +# https://bugs.debian.org/163347 + +: ${srcdir=.} +. "$srcdir/testlib.sh" + +: ${MAN=man} + +init +fake_config /usr/local/man /usr/share/man +MANPATH="$tmpdir/usr/local/man:$tmpdir/usr/share/man" +export MANPATH + +write_page md5sum 1 "$tmpdir/usr/share/man/man1/md5sum.1.gz" \ + UTF-8 gz '' 'md5sum \- Debian md5sum manual page' +write_page md5sum 1 "$tmpdir/usr/share/man/man1/md5sum.textutils.1.gz" \ + UTF-8 gz '' 'md5sum \- coreutils md5sum manual page' +mkdir -p "$tmpdir/usr/local/man/man1" +ln -s ../../../share/man/man1/md5sum.textutils.1.gz \ + "$tmpdir/usr/local/man/man1/md5sum.1.gz" +cat >"$tmpdir/1.exp" <<EOF +$abstmpdir/usr/share/man/man1/md5sum.textutils.1.gz +$abstmpdir/usr/share/man/man1/md5sum.1.gz +EOF +run $MAN -C "$tmpdir/manpath.config" -aw md5sum >"$tmpdir/1.out" +expect_pass 'symlinks with matching names win' \ + 'diff -u "$tmpdir/1.exp" "$tmpdir/1.out"' + +finish |