[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
From: |
Mihail Konev |
Subject: |
Re: [Man-db-devel] [PATCH v2 1/2] src/tests: Fix man-9 depending on --override_dir |
Date: |
Tue, 3 Jan 2017 01:46:57 +0500 |
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(-)
diff --git a/src/tests/man-9 b/src/tests/man-9
index 4dc03319db9f..7d48908f5d49 100755
--- a/src/tests/man-9
+++ b/src/tests/man-9
@@ -28,18 +28,18 @@ 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" <<EOF
+sort >"$tmpdir/1.exp" <<EOF
$abstmpdir/usr/share/man/${OVERRIDE}/man1/abc.1
$abstmpdir/usr/share/man/man1/abc.1
EOF
else
-cat >"$tmpdir/1.exp" <<EOF
+sort >"$tmpdir/1.exp" <<EOF
$abstmpdir/usr/share/man/man1/abc.1
EOF
fi
-run $MAN -C "$tmpdir/manpath.config" -aw abc >"$tmpdir/1.out"
+run $MAN -C "$tmpdir/manpath.config" -aw abc | sort >"$tmpdir/1.out"
expect_pass 'testing override dir' \
'diff -u "$tmpdir/1.exp" "$tmpdir/1.out"'
--
2.9.2