summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/root/contents.txt1
-rw-r--r--tests/root/special/code.py2
-rw-r--r--tests/root/subdir/includes.txt12
-rw-r--r--tests/test_build.py5
4 files changed, 20 insertions, 0 deletions
diff --git a/tests/root/contents.txt b/tests/root/contents.txt
index 719034ce2..0e52593e2 100644
--- a/tests/root/contents.txt
+++ b/tests/root/contents.txt
@@ -13,6 +13,7 @@ Contents:
images
subdir/images
+ subdir/includes
includes
markup
desc
diff --git a/tests/root/special/code.py b/tests/root/special/code.py
new file mode 100644
index 000000000..70c48d2e7
--- /dev/null
+++ b/tests/root/special/code.py
@@ -0,0 +1,2 @@
+print "line 1"
+print "line 2"
diff --git a/tests/root/subdir/includes.txt b/tests/root/subdir/includes.txt
new file mode 100644
index 000000000..3e1ae0d13
--- /dev/null
+++ b/tests/root/subdir/includes.txt
@@ -0,0 +1,12 @@
+Including in subdir
+===================
+
+.. absolute filename
+.. literalinclude:: /special/code.py
+ :lines: 1
+
+.. relative filename
+.. literalinclude:: ../special/code.py
+ :lines: 2
+
+Absolute :download:`/img.png` download.
diff --git a/tests/test_build.py b/tests/test_build.py
index b9d2c7793..f451b3052 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -70,6 +70,11 @@ HTML_XPATH = {
".//img[@src='../_images/img1.png']": '',
".//img[@src='../_images/rimg.png']": '',
},
+ 'subdir/includes.html': {
+ ".//pre/span": 'line 1',
+ ".//pre/span": 'line 2',
+ ".//a[@href='../_downloads/img.png']": '',
+ },
'includes.html': {
".//pre": u'Max Strauß',
".//a[@href='_downloads/img.png']": '',