From: Matthew Fernandez Date: Sun, 26 Sep 2021 05:43:53 +0000 (-0700) Subject: add a test case provoking gv2gml/gml2gv confusion X-Git-Tag: 2.49.2~37^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8182be54033f771bd741a91505b30f081e27e100;p=graphviz add a test case provoking gv2gml/gml2gv confusion Related to #2131. --- diff --git a/rtest/test_regression.py b/rtest/test_regression.py index bf489e944..994263e1c 100644 --- a/rtest/test_regression.py +++ b/rtest/test_regression.py @@ -1203,6 +1203,25 @@ def test_2095(): # ask Graphviz to process it subprocess.check_call(["dot", "-Tpdf", "-o", os.devnull, input]) +@pytest.mark.skipif(shutil.which("gv2gml") is None, + reason="gv2gml not available") +@pytest.mark.xfail(strict=(os.getenv("build_system") == "cmake")) +def test_2131(): + """ + gv2gml should be able to process basic Graphviz input + https://gitlab.com/graphviz/graphviz/-/issues/2131 + """ + + # a trivial graph + input = "digraph { a -> b; }" + + # ask gv2gml what it thinks of this + p = subprocess.Popen(["gv2gml"], stdin=subprocess.PIPE, + universal_newlines=True) + p.communicate(input) + + assert p.returncode == 0, "gv2gml rejected a basic graph" + def test_package_version(): """ The graphviz_version.h header should define a non-empty PACKAGE_VERSION