diff --git a/test/data/shr/div-div.html b/test/data/shr/div-div.html
new file mode 100644
index 00000000000..1c191ae44d8
--- /dev/null
+++ b/test/data/shr/div-div.html
@@ -0,0 +1 @@
+
foo
Bar
diff --git a/test/data/shr/div-div.txt b/test/data/shr/div-div.txt
new file mode 100644
index 00000000000..62715e12513
--- /dev/null
+++ b/test/data/shr/div-div.txt
@@ -0,0 +1,2 @@
+foo
+Bar
diff --git a/test/data/shr/div-p.html b/test/data/shr/div-p.html
index 810b2f75e3c..fcbdfc43293 100644
--- a/test/data/shr/div-p.html
+++ b/test/data/shr/div-p.html
@@ -1 +1 @@
-foo
Bar
+
foo
Bar
diff --git a/test/data/shr/li-div.html b/test/data/shr/li-div.html
new file mode 100644
index 00000000000..eca3c511bd9
--- /dev/null
+++ b/test/data/shr/li-div.html
@@ -0,0 +1,10 @@
+
+ -
+
+
This is the first paragraph of a list item.
+ This is the second paragraph of a list item.
+ -
+
This is the first paragraph of a list item.
+ This is the second paragraph of a list item.
+
+
diff --git a/test/data/shr/li-div.txt b/test/data/shr/li-div.txt
new file mode 100644
index 00000000000..9fc54f2bdc6
--- /dev/null
+++ b/test/data/shr/li-div.txt
@@ -0,0 +1,6 @@
+* This is the first paragraph of a list item.
+
+ This is the second paragraph of a list item.
+
+* This is the first paragraph of a list item.
+ This is the second paragraph of a list item.
diff --git a/test/lisp/net/shr-tests.el b/test/lisp/net/shr-tests.el
index 60788174d9c..6606ec58151 100644
--- a/test/lisp/net/shr-tests.el
+++ b/test/lisp/net/shr-tests.el
@@ -23,10 +23,14 @@
;;; Code:
+(require 'shr)
+
(defun shr-test (name)
(with-temp-buffer
(insert-file-contents (format "data/shr/%s.html" name))
- (let ((dom (libxml-parse-html-region (point-min) (point-max))))
+ (let ((dom (libxml-parse-html-region (point-min) (point-max)))
+ (shr-width 80)
+ (shr-use-fonts nil))
(erase-buffer)
(shr-insert-document dom)
(cons (buffer-substring-no-properties (point-min) (point-max))
@@ -37,9 +41,10 @@
(ert-deftest rendering ()
(skip-unless (fboundp 'libxml-parse-html-region))
(dolist (file (directory-files "data/shr" nil "\\.html\\'"))
- (let ((result (shr-test (replace-regexp-in-string
- "\\.html\\'" "" file))))
- (should (equal (car result) (cdr result))))))
+ (let* ((name (replace-regexp-in-string "\\.html\\'" "" file))
+ (result (shr-test name)))
+ (unless (equal (car result) (cdr result))
+ (should (not (list name (car result) (cdr result))))))))
(require 'shr)