--- /dev/null
+digraph TicketBooking {
+ component=true;layout=fdp;
+ node [shape=box style=filled];
+ cluster_reservation -> cluster_cinema;
+ cluster_reservation -> cluster_movie;
+ cluster_reservation -> cluster_user;
+
+ subgraph cluster_cinema {
+ label="Cinema(Context)";
+ }
+
+ subgraph cluster_movie {
+ label="Movie(Context)";
+ }
+
+ subgraph cluster_reservation {
+ label="Reservation(Context)";
+ }
+
+ subgraph cluster_user {
+ label="User(Context)";
+ }
+}
# run the test
run_c(c_src, link=["cgraph", "gvc"])
+
+@pytest.mark.xfail(strict=True)
+def test_2282():
+ """
+ using the `fdp` layout with JSON output should result in valid JSON
+ https://gitlab.com/graphviz/graphviz/-/issues/2282
+ """
+
+ # locate our associated test case in this directory
+ input = Path(__file__).parent / "2282.dot"
+ assert input.exists(), "unexpectedly missing test case"
+
+ # translate this to JSON
+ output = dot("json", input)
+
+ # confirm this is valid JSON
+ json.loads(output)