mirror of
https://github.com/TheLocehiliosan/yadm
synced 2026-03-02 03:49:29 +00:00
Run mandoc or groff instead of man.REAL to check man page
Also fix all warnings reported by mandoc and apply some of the recommendations from https://liw.fi/manpages/.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""Syntax checks"""
|
||||
|
||||
import os
|
||||
import shutil
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -77,7 +78,11 @@ def test_yamllint(pytestconfig, runner, yamllint_version):
|
||||
|
||||
def test_man(runner):
|
||||
"""Check for warnings from man"""
|
||||
run = runner(command=["man.REAL", "--warnings", "./yadm.1"])
|
||||
if shutil.which("mandoc"):
|
||||
command = ["mandoc", "-T", "lint"]
|
||||
else:
|
||||
command = ["groff", "-ww", "-z"]
|
||||
run = runner(command=command + ["-man", "./yadm.1"])
|
||||
assert run.success
|
||||
assert run.out == ""
|
||||
assert run.err == ""
|
||||
assert "yadm - Yet Another Dotfiles Manager" in run.out
|
||||
|
||||
Reference in New Issue
Block a user