]> code.delx.au - gnu-emacs/blobdiff - test/lisp/net/shr-tests.el
Encode the shr tests files with trailing white space
[gnu-emacs] / test / lisp / net / shr-tests.el
index 6606ec58151dc17cb6fd30650472cd4ea13648df..ab6fc93d1a057cc811e8a82d75aeac3c82a687e7 100644 (file)
@@ -36,6 +36,9 @@
       (cons (buffer-substring-no-properties (point-min) (point-max))
             (with-temp-buffer
               (insert-file-contents (format "data/shr/%s.txt" name))
+              (while (re-search-forward "%\\([0-9A-F][0-9A-F]\\)" nil t)
+                (replace-match (string (string-to-number (match-string 1) 16))
+                               t t))
               (buffer-string))))))
 
 (ert-deftest rendering ()