summaryrefslogtreecommitdiffstats
path: root/tests/roots/test-ext-graphviz
diff options
context:
space:
mode:
Diffstat (limited to 'tests/roots/test-ext-graphviz')
-rw-r--r--tests/roots/test-ext-graphviz/_static/images/test.svg8
-rw-r--r--tests/roots/test-ext-graphviz/conf.py3
-rw-r--r--tests/roots/test-ext-graphviz/graph.dot3
-rw-r--r--tests/roots/test-ext-graphviz/graph.xx.dot3
-rw-r--r--tests/roots/test-ext-graphviz/index.rst43
5 files changed, 60 insertions, 0 deletions
diff --git a/tests/roots/test-ext-graphviz/_static/images/test.svg b/tests/roots/test-ext-graphviz/_static/images/test.svg
new file mode 100644
index 0000000..6134f44
--- /dev/null
+++ b/tests/roots/test-ext-graphviz/_static/images/test.svg
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg version="1.1"
+ height="128" width="128"
+ xmlns="http://www.w3.org/2000/svg">
+
+ <rect width="100%" height="100%" fill="red" />
+
+</svg>
diff --git a/tests/roots/test-ext-graphviz/conf.py b/tests/roots/test-ext-graphviz/conf.py
new file mode 100644
index 0000000..317457f
--- /dev/null
+++ b/tests/roots/test-ext-graphviz/conf.py
@@ -0,0 +1,3 @@
+extensions = ['sphinx.ext.graphviz']
+exclude_patterns = ['_build']
+html_static_path = ["_static"]
diff --git a/tests/roots/test-ext-graphviz/graph.dot b/tests/roots/test-ext-graphviz/graph.dot
new file mode 100644
index 0000000..ca57244
--- /dev/null
+++ b/tests/roots/test-ext-graphviz/graph.dot
@@ -0,0 +1,3 @@
+digraph {
+ bar -> baz
+}
diff --git a/tests/roots/test-ext-graphviz/graph.xx.dot b/tests/roots/test-ext-graphviz/graph.xx.dot
new file mode 100644
index 0000000..e5add5c
--- /dev/null
+++ b/tests/roots/test-ext-graphviz/graph.xx.dot
@@ -0,0 +1,3 @@
+digraph {
+ BAR -> BAZ
+}
diff --git a/tests/roots/test-ext-graphviz/index.rst b/tests/roots/test-ext-graphviz/index.rst
new file mode 100644
index 0000000..cb0f069
--- /dev/null
+++ b/tests/roots/test-ext-graphviz/index.rst
@@ -0,0 +1,43 @@
+graphviz
+========
+
+.. digraph:: foo
+ :caption: caption of graph
+
+ bar -> baz
+
+.. |graph| digraph:: bar
+
+ bar -> baz
+
+Hello |graph| graphviz world
+
+.. digraph:: foo
+ :graphviz_dot: neato
+ :class: neato_graph
+
+ baz -> qux
+
+
+.. graphviz:: graph.dot
+
+.. digraph:: bar
+ :align: right
+ :caption: on *right*
+
+ foo -> bar
+
+.. digraph:: foo
+ :align: center
+
+ centered
+
+.. graphviz::
+ :align: center
+
+ digraph test {
+ foo [label="foo", URL="#graphviz", target="_parent"]
+ bar [label="bar", image="./_static/images/test.svg"]
+ baz [label="baz", URL="./_static/images/test.svg"]
+ foo -> bar -> baz
+ }