--- /dev/null
+<ul>
+ <li>
+ <div>
+ <p >This is the first paragraph of a list item.</div>
+ <p >This is the second paragraph of a list item.</li>
+ <li>
+ <div>This is the first paragraph of a list item.</div>
+ <div>This is the second paragraph of a list item.</div>
+ </li>
+</ul>
--- /dev/null
+* 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.
;;; 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))
(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)