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

index f361099cc388b996366bd2806923a27f617dcbe5..1b5a3d47bf5abc8b535b1945a8ba11ecdc0b840b 100644 (file)
@@ -433,6 +433,27 @@ 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_1876():
+    '''
+    fdp should not rename nodes with internal names
+    https://gitlab.com/graphviz/graphviz/-/issues/1876
+    '''
+
+    # a trivial graph to provoke this issue
+    input = 'graph { a }'
+
+    # process this with fdp
+    p = subprocess.Popen(['fdp'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
+      universal_newlines=True)
+    output, _ = p.communicate(input)
+
+    assert p.returncode == 0, 'fdp failed to process trivial graph'
+
+    # we should not see any internal names like '%3'
+    assert '%' not in output, 'internal name in fdp output'
+
 @pytest.mark.xfail(strict=True) # FIXME
 @pytest.mark.skipif(shutil.which('fdp') is None, reason='fdp not available')
 def test_1877():