aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCiro Santilli <ciro.santilli@gmail.com>2014-12-19 10:47:11 +0100
committerCiro Santilli <ciro.santilli@gmail.com>2014-12-19 12:29:05 +0100
commit1ac9a016f45d5453e8f53d1b53e48d6fc787b37a (patch)
treee8ee9151e87546e9b44470b962407f16c041ccfc
parent0479ddaeb0f54f960db0537ee1f39702ae400eb8 (diff)
Expose failure to normalize whitespaces
-rw-r--r--.travis.yml1
-rw-r--r--test/normalize.py8
2 files changed, 7 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index d715514..0446bad 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,3 +8,4 @@ before_install:
script:
- make testtarball
- PROG=`ls cmark-*.*/build/src/cmark` make leakcheck
+ - python -m doctest test/normalize.py
diff --git a/test/normalize.py b/test/normalize.py
index 6cb11b4..29e404b 100644
--- a/test/normalize.py
+++ b/test/normalize.py
@@ -115,8 +115,12 @@ def normalize_html(html):
Return normalized form of HTML which ignores insignificant output
differences:
- * Multiple inner whitespaces are collapsed to a single space (except
- in pre tags).
+ Multiple inner whitespaces are collapsed to a single space (except
+ in pre tags):
+
+ >>> normalize_html("<p>a \t\nb</p>")
+ u'<p>a b</p>'
+
* Outer whitespace (outside block-level tags) is removed.
* Self-closing tags are converted to open tags.
* Attributes are sorted and lowercased.