]> granicus.if.org Git - graphviz/commitdiff
add a test case for sequential PS graphs
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 9 Oct 2020 01:12:26 +0000 (18:12 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 15 Oct 2020 02:47:53 +0000 (19:47 -0700)
Related to #1845.

rtest/1845.dot [new file with mode: 0644]
rtest/test_regression.py

diff --git a/rtest/1845.dot b/rtest/1845.dot
new file mode 100644 (file)
index 0000000..2f09852
--- /dev/null
@@ -0,0 +1,7 @@
+digraph {
+    fear -> anger;
+}
+
+digraph {
+    anger -> hate;
+}
index 9a186ae4b49c465f62c47fc2a100033770c8501c..cc19419e0104c1cb4348ec4218cf142c1f7888bc 100644 (file)
@@ -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])