From 7e04bb0d90f3d2c9e717d0e8772ab514f62d3bd8 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 18 Nov 2020 19:16:40 -0800 Subject: [PATCH] add a test case for #1876 --- rtest/test_regression.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/rtest/test_regression.py b/rtest/test_regression.py index f361099cc..1b5a3d47b 100644 --- a/rtest/test_regression.py +++ b/rtest/test_regression.py @@ -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(): -- 2.40.0