from pathlib import Path
import platform
import re
+import shutil
import signal
import stat
import subprocess
# run it through Graphviz
dot("svg", input)
+@pytest.mark.skipif(shutil.which("groff") is None, reason="groff not available")
+@pytest.mark.xfail(strict=True)
+def test_2341():
+ """
+ PIC backend should generate correct comments
+ https://gitlab.com/graphviz/graphviz/-/issues/2341
+ """
+
+ # a simple graph
+ source = "digraph { a -> b; }"
+
+ # generate PIC from this
+ pic = dot("pic", source=source)
+
+ # run this through groff
+ groffed = subprocess.check_output(["groff", "-Tascii", "-p"], input=pic,
+ universal_newlines=True)
+
+ # it should not contain any comments
+ assert re.search(r"^\s*#", groffed) is None, \
+ "Graphviz comment remains in groff output"
+
def test_changelog_dates():
"""
Check the dates of releases in the changelog are correctly formatted