From: Ken Brown <kbrown@cornell.edu>
To: 23477@debbugs.gnu.org
Cc: Lars Magne Ingebrigtsen <larsi@gnus.org>
Subject: bug#23477: 25.1.50; shr-tests fails on an out-of-tree build
Date: Mon, 9 May 2016 10:27:52 -0400 [thread overview]
Message-ID: <3bbee285-0275-5d0a-6cc2-a096a2414595@cornell.edu> (raw)
In-Reply-To: <572E6E69.8050403@cornell.edu>
[-- Attachment #1: Type: text/plain, Size: 340 bytes --]
On 5/7/2016 6:38 PM, Ken Brown wrote:
> The test in test/lisp/net/shr-tests.el fails on an out-of-tree build
> because of the references to the relative directory "data/shr". I guess
> this should be replaced everywhere by something like
>
> (expand-file-name "test/data/shr" source-directory)
The attached patch seems to fix it.
Ken
[-- Attachment #2: shr-tests.patch --]
[-- Type: text/plain, Size: 1533 bytes --]
diff --git a/test/lisp/net/shr-tests.el b/test/lisp/net/shr-tests.el
index ab6fc93..501916f 100644
--- a/test/lisp/net/shr-tests.el
+++ b/test/lisp/net/shr-tests.el
@@ -25,9 +25,12 @@
(require 'shr)
+(defconst shr-tests--datadir
+ (expand-file-name "test/data/shr" source-directory))
+
(defun shr-test (name)
(with-temp-buffer
- (insert-file-contents (format "data/shr/%s.html" name))
+ (insert-file-contents (format (concat shr-tests--datadir "/%s.html") name))
(let ((dom (libxml-parse-html-region (point-min) (point-max)))
(shr-width 80)
(shr-use-fonts nil))
@@ -35,7 +38,8 @@ shr-test
(shr-insert-document dom)
(cons (buffer-substring-no-properties (point-min) (point-max))
(with-temp-buffer
- (insert-file-contents (format "data/shr/%s.txt" name))
+ (insert-file-contents
+ (format (concat shr-tests--datadir "/%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))
@@ -43,7 +47,7 @@ shr-test
(ert-deftest rendering ()
(skip-unless (fboundp 'libxml-parse-html-region))
- (dolist (file (directory-files "data/shr" nil "\\.html\\'"))
+ (dolist (file (directory-files shr-tests--datadir nil "\\.html\\'"))
(let* ((name (replace-regexp-in-string "\\.html\\'" "" file))
(result (shr-test name)))
(unless (equal (car result) (cdr result))
next prev parent reply other threads:[~2016-05-09 14:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-07 22:38 bug#23477: 25.1.50; shr-tests fails on an out-of-tree build Ken Brown
2016-05-09 14:27 ` Ken Brown [this message]
2016-05-24 15:35 ` Ken Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3bbee285-0275-5d0a-6cc2-a096a2414595@cornell.edu \
--to=kbrown@cornell.edu \
--cc=23477@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.