]> granicus.if.org Git - graphviz/commitdiff
add a test case provoking gv2gml/gml2gv confusion
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 26 Sep 2021 05:43:53 +0000 (22:43 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 26 Sep 2021 22:23:56 +0000 (15:23 -0700)
Related to #2131.

rtest/test_regression.py

index bf489e9449643f04a98292d4fcbe2fcb3b1ccb15..994263e1c06d93e0c22409eff5c09d1eba9a81c6 100644 (file)
@@ -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