summaryrefslogtreecommitdiff
path: root/tests/test_linkcode.py
diff options
context:
space:
mode:
authorshimizukawa <shimizukawa@gmail.com>2012-12-10 10:18:32 +0900
committershimizukawa <shimizukawa@gmail.com>2012-12-10 10:18:32 +0900
commitd45dcfbd7e5add4495a7e31ee53e672ee180d534 (patch)
treee3ccbee28f06bfccb66ab2c54cb3b1648409e704 /tests/test_linkcode.py
parent207e12471f451fee53a95ca6918c93abfef3a632 (diff)
parent5818df7941b73abecdb1b399fee7956ea283d698 (diff)
downloadsphinx-d45dcfbd7e5add4495a7e31ee53e672ee180d534.tar.gz
merge heads
Diffstat (limited to 'tests/test_linkcode.py')
-rw-r--r--tests/test_linkcode.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/test_linkcode.py b/tests/test_linkcode.py
new file mode 100644
index 00000000..365e826f
--- /dev/null
+++ b/tests/test_linkcode.py
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+"""
+ test_linkcode
+ ~~~~~~~~~~~~~
+
+ Test the sphinx.ext.linkcode extension.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+import os
+from util import *
+
+@with_app(srcdir='(temp)', buildername='html', tags=['test_linkcode'])
+def test_html(app):
+ app.builder.build_all()
+
+ fp = open(os.path.join(app.outdir, 'objects.html'), 'r')
+ try:
+ stuff = fp.read()
+ finally:
+ fp.close()
+
+ assert 'http://foobar/source/foolib.py' in stuff
+ assert 'http://foobar/js/' in stuff
+ assert 'http://foobar/c/' in stuff
+ assert 'http://foobar/cpp/' in stuff