[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Man-db-devel] [PATCH v2 1/2] src/tests: Fix man-9 depending on --ov
Re: [Man-db-devel] [PATCH v2 1/2] src/tests: Fix man-9 depending on --override_dir
Thu, 05 Jan 2017 12:20:09 +0100
On Tue, 2017-01-03 at 01:46 +0500, Mihail Konev wrote:
> The man() in src/man.c calls sort_candidates(), so -w option sorts
> its output before displaying.
> As value of override_dir affects paths to pages used in the test,
> it also affects the output which is being checked.
> Sort outputs before comparing them.
> Reported-by: Nikola Forró <address@hidden>
> v2: sort both outputs, not only the reference one
> src/tests/man-9 | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
this indeed fixes the test, but not the real use case for override dir.
The point of override dir is that overriden path has to be higher in
the path list than the path it overrides, so that overriden man page is
shown instead of the original one.
So either sort_candidates() function should prioritize paths containing
OVERRIDE_DIR, or the inclusion of overriden paths should happen only
after the path list is sorted.