all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#23477: 25.1.50; shr-tests fails on an out-of-tree build
@ 2016-05-07 22:38 Ken Brown
  2016-05-09 14:27 ` Ken Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Ken Brown @ 2016-05-07 22:38 UTC (permalink / raw)
  To: 23477

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)

Ken

In GNU Emacs 25.1.50.1 (x86_64-unknown-cygwin, GTK+ Version 3.18.9)
  of 2016-05-07 built on fiona
Repository revision: 29c9803c2a368b2f821a3fd7f7798e1632e6e29d
Windowing system distributor 'The Cygwin/X Project', version 11.0.11802000
Configured using:
  'configure 'CFLAGS=-g3 -O0''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY
ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11

Important settings:
   value of $LANG: en_US.UTF-8
   locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
   tooltip-mode: t
   global-eldoc-mode: t
   electric-indent-mode: t
   mouse-wheel-mode: t
   tool-bar-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   blink-cursor-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   line-number-mode: t
   transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#23477: 25.1.50; shr-tests fails on an out-of-tree build
  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
  2016-05-24 15:35   ` Ken Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Ken Brown @ 2016-05-09 14:27 UTC (permalink / raw)
  To: 23477; +Cc: Lars Magne Ingebrigtsen

[-- 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))

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#23477: 25.1.50; shr-tests fails on an out-of-tree build
  2016-05-09 14:27 ` Ken Brown
@ 2016-05-24 15:35   ` Ken Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Ken Brown @ 2016-05-24 15:35 UTC (permalink / raw)
  To: 23477-done; +Cc: Lars Magne Ingebrigtsen

On 5/9/2016 10:27 AM, Ken Brown wrote:
> 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.

I've installed the patch and am closing the bug.

Ken






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-24 15:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2016-05-24 15:35   ` Ken Brown

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.