summaryrefslogtreecommitdiffstats
path: root/tests/roots/test-linkcheck
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/roots/test-linkcheck-anchors-ignore-for-url/conf.py3
-rw-r--r--tests/roots/test-linkcheck-anchors-ignore-for-url/index.rst7
-rw-r--r--tests/roots/test-linkcheck-anchors-ignore/conf.py3
-rw-r--r--tests/roots/test-linkcheck-anchors-ignore/index.rst2
-rw-r--r--tests/roots/test-linkcheck-documents_exclude/br0ken_link.rst5
-rw-r--r--tests/roots/test-linkcheck-documents_exclude/broken_link.rst5
-rw-r--r--tests/roots/test-linkcheck-documents_exclude/conf.py6
-rw-r--r--tests/roots/test-linkcheck-documents_exclude/index.rst3
-rw-r--r--tests/roots/test-linkcheck-localserver-anchor/conf.py3
-rw-r--r--tests/roots/test-linkcheck-localserver-anchor/index.rst1
-rw-r--r--tests/roots/test-linkcheck-localserver-https/conf.py2
-rw-r--r--tests/roots/test-linkcheck-localserver-https/index.rst1
-rw-r--r--tests/roots/test-linkcheck-localserver-warn-redirects/conf.py2
-rw-r--r--tests/roots/test-linkcheck-localserver-warn-redirects/index.rst3
-rw-r--r--tests/roots/test-linkcheck-localserver/conf.py2
-rw-r--r--tests/roots/test-linkcheck-localserver/index.rst1
-rw-r--r--tests/roots/test-linkcheck-raw-node/conf.py2
-rw-r--r--tests/roots/test-linkcheck-raw-node/index.rst2
-rw-r--r--tests/roots/test-linkcheck-too-many-retries/conf.py3
-rw-r--r--tests/roots/test-linkcheck-too-many-retries/index.rst1
-rw-r--r--tests/roots/test-linkcheck/conf.py4
-rw-r--r--tests/roots/test-linkcheck/links.rst14
22 files changed, 75 insertions, 0 deletions
diff --git a/tests/roots/test-linkcheck-anchors-ignore-for-url/conf.py b/tests/roots/test-linkcheck-anchors-ignore-for-url/conf.py
new file mode 100644
index 0000000..0005bfa
--- /dev/null
+++ b/tests/roots/test-linkcheck-anchors-ignore-for-url/conf.py
@@ -0,0 +1,3 @@
+exclude_patterns = ['_build']
+linkcheck_anchors = True
+linkcheck_timeout = 0.05
diff --git a/tests/roots/test-linkcheck-anchors-ignore-for-url/index.rst b/tests/roots/test-linkcheck-anchors-ignore-for-url/index.rst
new file mode 100644
index 0000000..df287b4
--- /dev/null
+++ b/tests/roots/test-linkcheck-anchors-ignore-for-url/index.rst
@@ -0,0 +1,7 @@
+* `Example valid url, no anchor <http://localhost:7777/valid>`_
+* `Example valid url, valid anchor <http://localhost:7777/valid#valid-anchor>`_
+* `Example valid url, invalid anchor <http://localhost:7777/valid#invalid-anchor>`_
+* `Example ignored url, no anchor <http://localhost:7777/ignored>`_
+* `Example ignored url, invalid anchor <http://localhost:7777/ignored#invalid-anchor>`_
+* `Example invalid url, no anchor <http://localhost:7777/invalid>`_
+* `Example invalid url, invalid anchor <http://localhost:7777/invalid#anchor>`_
diff --git a/tests/roots/test-linkcheck-anchors-ignore/conf.py b/tests/roots/test-linkcheck-anchors-ignore/conf.py
new file mode 100644
index 0000000..0005bfa
--- /dev/null
+++ b/tests/roots/test-linkcheck-anchors-ignore/conf.py
@@ -0,0 +1,3 @@
+exclude_patterns = ['_build']
+linkcheck_anchors = True
+linkcheck_timeout = 0.05
diff --git a/tests/roots/test-linkcheck-anchors-ignore/index.rst b/tests/roots/test-linkcheck-anchors-ignore/index.rst
new file mode 100644
index 0000000..22a1379
--- /dev/null
+++ b/tests/roots/test-linkcheck-anchors-ignore/index.rst
@@ -0,0 +1,2 @@
+* `Example Bar invalid <http://localhost:7777/#!bar>`_
+* `Example Bar invalid <http://localhost:7777/#top>`_
diff --git a/tests/roots/test-linkcheck-documents_exclude/br0ken_link.rst b/tests/roots/test-linkcheck-documents_exclude/br0ken_link.rst
new file mode 100644
index 0000000..bf421f0
--- /dev/null
+++ b/tests/roots/test-linkcheck-documents_exclude/br0ken_link.rst
@@ -0,0 +1,5 @@
+Broken link
+===========
+
+Some links are `broken <https://www.sphinx-doc.org/this-is-another-broken-link>`__
+but sometimes not worrying about some broken links is a valid strategy.
diff --git a/tests/roots/test-linkcheck-documents_exclude/broken_link.rst b/tests/roots/test-linkcheck-documents_exclude/broken_link.rst
new file mode 100644
index 0000000..86e3bb4
--- /dev/null
+++ b/tests/roots/test-linkcheck-documents_exclude/broken_link.rst
@@ -0,0 +1,5 @@
+Broken link
+===========
+
+Some links are `broken <https://www.sphinx-doc.org/this-is-a-broken-link>`__
+but sometimes not worrying about some broken links is a valid strategy.
diff --git a/tests/roots/test-linkcheck-documents_exclude/conf.py b/tests/roots/test-linkcheck-documents_exclude/conf.py
new file mode 100644
index 0000000..52388f9
--- /dev/null
+++ b/tests/roots/test-linkcheck-documents_exclude/conf.py
@@ -0,0 +1,6 @@
+exclude_patterns = ['_build']
+linkcheck_exclude_documents = [
+ '^broken_link$',
+ 'br[0-9]ken_link',
+]
+linkcheck_timeout = 0.05
diff --git a/tests/roots/test-linkcheck-documents_exclude/index.rst b/tests/roots/test-linkcheck-documents_exclude/index.rst
new file mode 100644
index 0000000..57c39d8
--- /dev/null
+++ b/tests/roots/test-linkcheck-documents_exclude/index.rst
@@ -0,0 +1,3 @@
+.. toctree::
+ broken_link
+ br0ken_link \ No newline at end of file
diff --git a/tests/roots/test-linkcheck-localserver-anchor/conf.py b/tests/roots/test-linkcheck-localserver-anchor/conf.py
new file mode 100644
index 0000000..0005bfa
--- /dev/null
+++ b/tests/roots/test-linkcheck-localserver-anchor/conf.py
@@ -0,0 +1,3 @@
+exclude_patterns = ['_build']
+linkcheck_anchors = True
+linkcheck_timeout = 0.05
diff --git a/tests/roots/test-linkcheck-localserver-anchor/index.rst b/tests/roots/test-linkcheck-localserver-anchor/index.rst
new file mode 100644
index 0000000..807fe96
--- /dev/null
+++ b/tests/roots/test-linkcheck-localserver-anchor/index.rst
@@ -0,0 +1 @@
+`local server <http://localhost:7777/#anchor>`_
diff --git a/tests/roots/test-linkcheck-localserver-https/conf.py b/tests/roots/test-linkcheck-localserver-https/conf.py
new file mode 100644
index 0000000..a2ce01e
--- /dev/null
+++ b/tests/roots/test-linkcheck-localserver-https/conf.py
@@ -0,0 +1,2 @@
+exclude_patterns = ['_build']
+linkcheck_timeout = 0.05
diff --git a/tests/roots/test-linkcheck-localserver-https/index.rst b/tests/roots/test-linkcheck-localserver-https/index.rst
new file mode 100644
index 0000000..fea5983
--- /dev/null
+++ b/tests/roots/test-linkcheck-localserver-https/index.rst
@@ -0,0 +1 @@
+`HTTPS server <https://localhost:7777/>`_
diff --git a/tests/roots/test-linkcheck-localserver-warn-redirects/conf.py b/tests/roots/test-linkcheck-localserver-warn-redirects/conf.py
new file mode 100644
index 0000000..a2ce01e
--- /dev/null
+++ b/tests/roots/test-linkcheck-localserver-warn-redirects/conf.py
@@ -0,0 +1,2 @@
+exclude_patterns = ['_build']
+linkcheck_timeout = 0.05
diff --git a/tests/roots/test-linkcheck-localserver-warn-redirects/index.rst b/tests/roots/test-linkcheck-localserver-warn-redirects/index.rst
new file mode 100644
index 0000000..7359bd5
--- /dev/null
+++ b/tests/roots/test-linkcheck-localserver-warn-redirects/index.rst
@@ -0,0 +1,3 @@
+`local server1 <http://localhost:7777/path1>`_
+
+`local server2 <http://localhost:7777/path2>`_
diff --git a/tests/roots/test-linkcheck-localserver/conf.py b/tests/roots/test-linkcheck-localserver/conf.py
new file mode 100644
index 0000000..a2ce01e
--- /dev/null
+++ b/tests/roots/test-linkcheck-localserver/conf.py
@@ -0,0 +1,2 @@
+exclude_patterns = ['_build']
+linkcheck_timeout = 0.05
diff --git a/tests/roots/test-linkcheck-localserver/index.rst b/tests/roots/test-linkcheck-localserver/index.rst
new file mode 100644
index 0000000..c617e94
--- /dev/null
+++ b/tests/roots/test-linkcheck-localserver/index.rst
@@ -0,0 +1 @@
+`local server <http://localhost:7777/>`_
diff --git a/tests/roots/test-linkcheck-raw-node/conf.py b/tests/roots/test-linkcheck-raw-node/conf.py
new file mode 100644
index 0000000..a2ce01e
--- /dev/null
+++ b/tests/roots/test-linkcheck-raw-node/conf.py
@@ -0,0 +1,2 @@
+exclude_patterns = ['_build']
+linkcheck_timeout = 0.05
diff --git a/tests/roots/test-linkcheck-raw-node/index.rst b/tests/roots/test-linkcheck-raw-node/index.rst
new file mode 100644
index 0000000..76e26b5
--- /dev/null
+++ b/tests/roots/test-linkcheck-raw-node/index.rst
@@ -0,0 +1,2 @@
+.. raw:: html
+ :url: http://localhost:7777/
diff --git a/tests/roots/test-linkcheck-too-many-retries/conf.py b/tests/roots/test-linkcheck-too-many-retries/conf.py
new file mode 100644
index 0000000..0005bfa
--- /dev/null
+++ b/tests/roots/test-linkcheck-too-many-retries/conf.py
@@ -0,0 +1,3 @@
+exclude_patterns = ['_build']
+linkcheck_anchors = True
+linkcheck_timeout = 0.05
diff --git a/tests/roots/test-linkcheck-too-many-retries/index.rst b/tests/roots/test-linkcheck-too-many-retries/index.rst
new file mode 100644
index 0000000..29b1ae4
--- /dev/null
+++ b/tests/roots/test-linkcheck-too-many-retries/index.rst
@@ -0,0 +1 @@
+`Non-existing uri with localhost <https://localhost:7777/doesnotexist>`_
diff --git a/tests/roots/test-linkcheck/conf.py b/tests/roots/test-linkcheck/conf.py
new file mode 100644
index 0000000..6ddb41a
--- /dev/null
+++ b/tests/roots/test-linkcheck/conf.py
@@ -0,0 +1,4 @@
+root_doc = 'links'
+exclude_patterns = ['_build']
+linkcheck_anchors = True
+linkcheck_timeout = 0.05
diff --git a/tests/roots/test-linkcheck/links.rst b/tests/roots/test-linkcheck/links.rst
new file mode 100644
index 0000000..88c757e
--- /dev/null
+++ b/tests/roots/test-linkcheck/links.rst
@@ -0,0 +1,14 @@
+Some additional anchors to exercise ignore code
+
+* `Valid url <http://localhost:7777/>`_
+* `Bar anchor invalid (trailing slash) <http://localhost:7777/#!bar>`_
+* `Bar anchor invalid <http://localhost:7777#!bar>`_ tests that default ignore anchor of #! does not need to be prefixed with /
+* `Top anchor invalid <http://localhost:7777/#top>`_
+* `'does-not-exist' anchor invalid <http://localhost:7777#does-not-exist>`_
+* `Valid local file <conf.py>`_
+* `Invalid local file <path/to/notfound>`_
+
+.. image:: http://localhost:7777/image.png
+.. figure:: http://localhost:7777/image2.png
+
+* `Valid anchored url <http://localhost:7777/anchor.html#found>`_