]> granicus.if.org Git - graphviz/commitdiff
add a test case for #1877
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 19 Nov 2020 03:10:15 +0000 (19:10 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 9 Jan 2021 20:49:45 +0000 (12:49 -0800)
rtest/test_regression.py

index fda365befff64c6d89b0937014f549f43c0e7aee..f361099cc388b996366bd2806923a27f617dcbe5 100644 (file)
@@ -433,6 +433,23 @@ def test_1865():
     # fdp should not crash when processing this file
     subprocess.check_call(['fdp', '-o', os.devnull, input])
 
+@pytest.mark.xfail(strict=True) # FIXME
+@pytest.mark.skipif(shutil.which('fdp') is None, reason='fdp not available')
+def test_1877():
+    '''
+    fdp should not fail an assertion when processing cluster edges
+    https://gitlab.com/graphviz/graphviz/-/issues/1877
+    '''
+
+    # simple input with a cluster edge
+    input = 'graph {subgraph cluster_a {}; cluster_a -- b}'
+
+    # fdp should be able to process this
+    p = subprocess.Popen(['fdp', '-o', os.devnull], stdin=subprocess.PIPE,
+      universal_newlines=True)
+    p.communicate(input)
+    assert p.returncode == 0
+
 def test_1898():
     '''
     test a segfault from https://gitlab.com/graphviz/graphviz/-/issues/1898 has