From: Matthew Fernandez Date: Sat, 22 Oct 2022 21:15:15 +0000 (-0700) Subject: add a test case for 'gxl2gv' crash X-Git-Tag: 7.0.1~14^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=214ff0b397c677c50544510d14e1cb92a85ceb45;p=graphviz add a test case for 'gxl2gv' crash This is one of the variants of #2300. Gitlab: #2300 --- diff --git a/tests/2300.gxl b/tests/2300.gxl new file mode 100644 index 000000000..a3cfdb724 --- /dev/null +++ b/tests/2300.gxl @@ -0,0 +1,10 @@ + + + + + + qux + + + + diff --git a/tests/test_regression.py b/tests/test_regression.py index 3f5f9f675..efd8f0ce5 100644 --- a/tests/test_regression.py +++ b/tests/test_regression.py @@ -1994,3 +1994,19 @@ def test_2282(): # confirm this is valid JSON json.loads(output) + +@pytest.mark.skipif(shutil.which("gxl2gv") is None, + reason="gxl2gv not available") +@pytest.mark.xfail() +def test_2300_1(): + """ + translating GXL with an attribute `name` should not crash + https://gitlab.com/graphviz/graphviz/-/issues/2300 + """ + + # locate our associated test case containing a node attribute `name` + input = Path(__file__).parent / "2300.gxl" + assert input.exists(), "unexpectedly missing test case" + + # ask `gxl2gv` to process this + subprocess.check_call(["gxl2gv", input])