Encode the shr tests files with trailing white space

This commit is contained in:
Lars Magne Ingebrigtsen 2016-04-24 15:18:22 +02:00
parent 8e2e252932
commit 331f4a6381
3 changed files with 6 additions and 6 deletions

3
.gitattributes vendored
View file

@ -33,9 +33,6 @@ test/etags/html-src/algrthms.html whitespace=cr-at-eol
# The upstream maintainer does not want to remove trailing whitespace.
doc/misc/texinfo.tex -whitespace=blank-at-eol
# The shr test files can have trailing whitespace.
test/data/shr/*.txt -whitespace=blank-at-eol
# Some files should not be treated as text when diffing or merging.
*.cur binary
*.gpg binary

View file

@ -1,3 +1,3 @@
1
2
3
1%20
2%20
3%20

View 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 ()