aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Leung <leungbk@mailfence.com>2019-09-20 18:47:25 +0200
committerBrian Leung <leungbk@mailfence.com>2019-10-19 01:42:52 -0700
commit5f760515c86ebdb5fae8524097b3ad35204d734d (patch)
tree318c8ef681accdb1ee443a6ac2a70f1c95501be1
parent03b966657e02fe0f6370ac1b9f872b1564874837 (diff)
downloadguix-5f760515c86ebdb5fae8524097b3ad35204d734d.tar
guix-5f760515c86ebdb5fae8524097b3ad35204d734d.tar.gz
gnu: emacs-nodejs-repl: Enable tests.
* gnu/packages/emacs-xyz.scm (emacs-nodejs-repl): Enable tests.
-rw-r--r--gnu/packages/emacs-xyz.scm29
1 files changed, 29 insertions, 0 deletions
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 81baef69a6..983d226a5f 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