guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: emacs-fb2-reader: Properly enable tests.


From: guix-commits
Subject: 02/02: gnu: emacs-fb2-reader: Properly enable tests.
Date: Sat, 6 Apr 2024 12:21:56 -0400 (EDT)

ngz pushed a commit to branch master
in repository guix.

commit 726e7e3996fdef7a5f9da0f4cbb4ae35fcddc2c8
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Sat Apr 6 18:17:06 2024 +0200

    gnu: emacs-fb2-reader: Properly enable tests.
    
    * gnu/packages/emacs-xyz.scm (emacs-fb2-reader)[arguments]<#:test-command>:
    Use command to actually run tests.
    <#:phases>: Fix a bogus function name in a test.
    
    Change-Id: I267b219e2b8f547c00cbe3971d21da2f7b599311
---
 gnu/packages/emacs-xyz.scm | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 1dde90c54e..3ade606925 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -2715,8 +2715,7 @@ provides an optional IDE-like error list.")
        (list
         #:tests? #t
         #:test-command
-        #~(list "emacs" "-Q" "--batch" "-L" "."
-                "--eval" "(load-file \"tests/test-fb2-reader.el\")")
+        #~(list "buttercup" "-L" ".")
         #:phases
         #~(modify-phases %standard-phases
             (add-after 'unpack 'qualify-paths
@@ -2724,12 +2723,17 @@ provides an optional IDE-like error list.")
                 (let ((unzip (search-input-file inputs "/bin/unzip")))
                   (substitute* "fb2-reader.el"
                     (("unzip") unzip)))))
-            (add-after 'unpack 'compatibility-with-recent-buttercup
+            (add-after 'unpack 'fix-tests
               (lambda _
+                ;; Lexical binding is required for compatibility with recent
+                ;; Buttercup.
                 (emacs-batch-edit-file "tests/test-fb2-reader.el"
                   '(progn
-                    (insert ";;; -*-lexical-binding:t-*-")
-                    (basic-save-buffer))))))))
+                    (insert ";;; -*-lexical-binding:t -*-\n")
+                    (basic-save-buffer)))
+                ;; Fix bogus function name.
+                (substitute* "tests/test-fb2-reader.el"
+                  (("fb2-reader-render") "fb2-reader-render-xml")))))))
       (inputs (list unzip))
       (native-inputs
        (list emacs-async emacs-buttercup emacs-dash emacs-s))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]