diff options
author | Georg Brandl <georg@python.org> | 2009-02-24 13:38:15 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-02-24 13:38:15 +0100 |
commit | fb511a015aa47c943c5dc1286f58743fca307b1c (patch) | |
tree | 737f4a288eaaf69898c3139fdb0c79499c4bf910 /tests | |
parent | 29247f0896fc66a54d2fe77d05d32b0786c84a18 (diff) | |
download | sphinx-git-fb511a015aa47c943c5dc1286f58743fca307b1c.tar.gz |
Paths to literal include files and download files can now be absolute too.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/root/contents.txt | 1 | ||||
-rw-r--r-- | tests/root/special/code.py | 2 | ||||
-rw-r--r-- | tests/root/subdir/includes.txt | 12 | ||||
-rw-r--r-- | tests/test_build.py | 5 |
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']": '', |