From: Matthew Fernandez Date: Fri, 9 Oct 2020 01:12:26 +0000 (-0700) Subject: add a test case for sequential PS graphs X-Git-Tag: 2.46.0~20^2^2~39^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=21205cb49bf670688665447f8bb2ab4fe2051971;p=graphviz add a test case for sequential PS graphs Related to #1845. --- diff --git a/rtest/1845.dot b/rtest/1845.dot new file mode 100644 index 000000000..2f09852ac --- /dev/null +++ b/rtest/1845.dot @@ -0,0 +1,7 @@ +digraph { + fear -> anger; +} + +digraph { + anger -> hate; +} diff --git a/rtest/test_regression.py b/rtest/test_regression.py index 9a186ae4b..cc19419e0 100644 --- a/rtest/test_regression.py +++ b/rtest/test_regression.py @@ -369,3 +369,16 @@ def test_1818(): universal_newlines=True) assert 'Usage' in output, 'lefty -? did not show usage' + +def test_1845(): + ''' + rendering sequential graphs to PS should not segfault + https://gitlab.com/graphviz/graphviz/-/issues/1845 + ''' + + # locate our associated test case in this directory + input = os.path.join(os.path.dirname(__file__), '1845.dot') + assert os.path.exists(input), 'unexpectedly missing test case' + + # generate a multipage PS file from this input + subprocess.check_call(['dot', '-Tps', '-o', os.devnull, input])