man-db/man-db-2.10.0-fix-mandb-symlink-target-timestamp-test.patch
2022-02-08 10:55:06 +01:00

34 lines
1.6 KiB
Diff

From b86431ba72c3a21484fb221db6b6a82a78cc4bd8 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@debian.org>
Date: Fri, 4 Feb 2022 16:13:09 +0000
Subject: [PATCH] Fix mandb-symlink-target-timestamp test
* src/tests/mandb-symlink-target-timestamp: Fix handling of the case
where the nanosecond part of a timestamp starts with a zero.
* src/tests/mandb-symlink-target-timestamp: Fix handling of the case
where the nanosecond part of a timestamp is exactly 0 (probably because
the filesystem doesn't support nanosecond resolution).
---
src/tests/mandb-symlink-target-timestamp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/tests/mandb-symlink-target-timestamp b/src/tests/mandb-symlink-target-timestamp
index 1c87d3d..bc1baf1 100755
--- a/src/tests/mandb-symlink-target-timestamp
+++ b/src/tests/mandb-symlink-target-timestamp
@@ -21,8 +21,8 @@ write_page test 1 "$tmpdir/usr/share/man/man1/test.1.gz" \
ln -s test.1.gz "$tmpdir/usr/share/man/man1/test-link.1.gz"
run $MANDB -C "$tmpdir/manpath.config" -u -q "$tmpdir/usr/share/man"
cat >"$tmpdir/1.exp" <<EOF
-test -> "- 1 1 $(./get-mtime "$tmpdir/usr/share/man/man1/test.1.gz" | tr . ' ') A - - gz test(1)"
-test-link -> "- 1 1 $(./get-mtime "$tmpdir/usr/share/man/man1/test-link.1.gz" | tr . ' ') B - - gz test(1)"
+test -> "- 1 1 $(./get-mtime "$tmpdir/usr/share/man/man1/test.1.gz" | sed 's/\.0*\([0-9]\)/ \1/') A - - gz test(1)"
+test-link -> "- 1 1 $(./get-mtime "$tmpdir/usr/share/man/man1/test-link.1.gz" | sed 's/\.0*\([0-9]\)/ \1/') B - - gz test(1)"
EOF
run $ACCESSDB "$tmpdir/usr/share/man/index$db_ext" | \
grep -v '^\$' >"$tmpdir/1.out"
--
2.34.1