#! /bin/sh # Test that whatis behaves appropriately when given a path to an executable. : ${srcdir=.} . "$srcdir/testlib.sh" : ${MANDB=mandb} : ${WHATIS=whatis} init fake_config /usr/share/man /usr/local/man cat >>"$tmpdir/manpath.config" <"$tmpdir/1.exp" <"$tmpdir/1.out" expect_pass 'simple name returns all matches' \ 'diff -u "$tmpdir/1.exp" "$tmpdir/1.out"' cat >"$tmpdir/2.exp" <"$tmpdir/2.out" expect_pass '/usr/bin/test only returns appropriate match' \ 'diff -u "$tmpdir/2.exp" "$tmpdir/2.out"' cat >"$tmpdir/3.exp" <"$tmpdir/3.out" expect_pass '/usr/local/bin/test only returns appropriate match' \ 'diff -u "$tmpdir/3.exp" "$tmpdir/3.out"' finish