From 0f793ea11953bcc10b2923a699147c11d27270ae Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 19 Jun 2021 11:00:39 -0700 Subject: [PATCH] add a test case for #1658 --- rtest/1658.dot | 59 ++++++++++++++++++++++++++++++++++++++++ rtest/test_regression.py | 14 ++++++++++ 2 files changed, 73 insertions(+) create mode 100644 rtest/1658.dot diff --git a/rtest/1658.dot b/rtest/1658.dot new file mode 100644 index 000000000..7f3e88eda --- /dev/null +++ b/rtest/1658.dot @@ -0,0 +1,59 @@ +graph { +# comment out this line and it works ok +splines="ortho"; + +node [shape="point"]; + +3; +2; +1; +0; + +node [shape="box"]; + +Charger -- IHall1 -- 3; +Charger -- IHall2 -- 2; +Charger -- IHall3 -- 1; +Charger -- 0; + + + +3 -- V3 -- 2 -- V2 -- 1 -- V1 -- 0 -- GND; + + +node [shape="triangle",orientation=270]; + +OpAmp3; +OpAmp2; +OpAmp1; + +node [shape="box"]; + +3 -- OpAmp3; +2 -- OpAmp3; + +2 -- OpAmp2; +1 -- OpAmp2; + +1 -- OpAmp1; +0 -- OpAmp1; + +#OpAmp3 -- ADC3 -- 0; +#OpAmp2 -- ADC2 -- 0; +#OpAmp1 -- ADC1 -- 0; + +# or comment out these 3 lines and it works ok +ADC3 -- 0; +ADC2 -- 0; +ADC1 -- 0; + + +OpAmp3 -- ADC3; +OpAmp2 -- ADC2; +OpAmp1 -- ADC1; + +V1 -- Temp1 [style=dashed]; +V2 -- Temp2 [style=dashed]; +V3 -- Temp3 [style=dashed]; + +} diff --git a/rtest/test_regression.py b/rtest/test_regression.py index eee4ddabf..cb400c580 100644 --- a/rtest/test_regression.py +++ b/rtest/test_regression.py @@ -391,6 +391,20 @@ def test_1594(): assert "line 3:" in stderr, \ "GVPR did not identify correct line of syntax error" +@pytest.mark.xfail() # FIXME +def test_1658(): + """ + the graph associated with this test case should not crash Graphviz + https://gitlab.com/graphviz/graphviz/-/issues/1658 + """ + + # locate our associated test case in this directory + input = Path(__file__).parent / "1658.dot" + assert input.exists(), "unexpectedly missing test case" + + # process it with Graphviz + subprocess.check_call(["dot", "-Tpng", "-o", os.devnull, input]) + def test_1676(): """ https://gitlab.com/graphviz/graphviz/-/issues/1676 -- 2.40.0