guix-commits
[Top][All Lists]
Advanced

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

02/02: gnu: emacs-nodejs-repl: Enable tests.


From: guix-commits
Subject: 02/02: gnu: emacs-nodejs-repl: Enable tests.
Date: Sat, 19 Oct 2019 05:01:31 -0400 (EDT)

leungbk pushed a commit to branch master
in repository guix.

commit 5f760515c86ebdb5fae8524097b3ad35204d734d
Author: Brian Leung <address@hidden>
Date:   Fri Sep 20 18:47:25 2019 +0200

    gnu: emacs-nodejs-repl: Enable tests.
    
    * gnu/packages/emacs-xyz.scm (emacs-nodejs-repl): Enable tests.
---
 gnu/packages/emacs-xyz.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 81baef6..983d226 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -118,6 +118,7 @@
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages node)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages acl)
@@ -6014,6 +6015,34 @@ strings, and code folding.")
                (base32
                 "1kkj888k9x5n0i7xkia177gzsa84my3g8n0n7v65281cc4f1yhk5"))))
     (build-system emacs-build-system)
+    (inputs
+     `(("node" ,node)))
+    (native-inputs
+     `(("emacs-ert-expectations" ,emacs-ert-expectations)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'set-shell
+           ;; Setting the SHELL environment variable is required for the tests
+           ;; to find sh.
+           (lambda _
+             (setenv "SHELL" (which "sh"))
+             #t))
+         (add-after 'unpack 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((node (assoc-ref inputs "node")))
+               ;; Specify the absolute file names of the various
+               ;; programs so that everything works out-of-the-box.
+               (make-file-writable "nodejs-repl.el")
+               (emacs-substitute-variables
+                   "nodejs-repl.el"
+                 ("nodejs-repl-command"
+                  (string-append node "/bin/node")))))))
+       #:tests? #t
+       #:test-command '("emacs" "-Q" "--batch"
+                        "-L" "."
+                        "-l" "test/test.el"
+                        "-f" "ert-run-tests-batch-and-exit")))
     (home-page "https://github.com/abicky/nodejs-repl.el";)
     (synopsis "Node.js REPL inside Emacs")
     (description



reply via email to

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