Add test suite

This commit adds a test suite and fixes replacement of ip address nodes
for IP addresses that are not part of a IP range directive.
This commit is contained in:
Jan Dittberner 2016-05-02 20:55:09 +02:00
parent a5c82a6985
commit 869039df5d
8 changed files with 113 additions and 15 deletions

View file

@ -13,13 +13,13 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
#import sys
#import os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('..'))
#sys.path.insert(0, os.path.abspath('..'))
# -- General configuration ------------------------------------------------

View file

@ -11,6 +11,8 @@ Contents:
.. toctree::
:maxdepth: 2
testpage1
testpage2
Indices and tables

6
tests/root/testpage1.rst Normal file
View file

@ -0,0 +1,6 @@
Test page 1
===========
.. ip:v4range:: 192.168.0.1/24
.. ip:v6range:: 2001:dead:beef::/64

8
tests/root/testpage2.rst Normal file
View file

@ -0,0 +1,8 @@
Test page 2
===========
This page contains IP addresses :ip:v4:`127.0.0.1`, :ip:v4:`192.168.0.1` and
:ip:v6:`2001:dead:beef::1` as well as :ip:v6:`::1`.
There is also :ip:v6range:`2001:dada:b001::/64` and
:ip:v4range:`172.16.0.0/24`.