summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2022-11-24 23:29:10 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2022-11-24 23:30:57 +0100
commitfa5701964d8946d87b999e1eb18f7881b047c54e (patch)
tree1ea6f50f61ee768f6c44b4f8936f43163fdb4871 /gnu/packages
parent84136e95b27753eae010ea183a77b653c80f134d (diff)
downloadguix-fa5701964d8946d87b999e1eb18f7881b047c54e.tar.gz
gnu: emacs-inspector: Activate tests.
* gnu/packages/emacs-xyz.scm (emacs-inspector)[arguments]: Add tests.  Skip
failing test.  Fix compatibility with Emacs 28 and older.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/emacs-xyz.scm22
1 files changed, 22 insertions, 0 deletions
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index cde1725185..3f6f69c3c4 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -570,6 +570,28 @@ configuration language which makes it trivial to write your own themes.")
           (base32 "0n72sqn29b5sya686cicgp40mkk5x5821b7bw4zs6dcl82cyij5n"))
          (file-name (git-file-name name version))))
       (build-system emacs-build-system)
+      (arguments
+       (list
+        #:tests? #t
+        #:test-command #~(list "emacs" "-Q" "--batch"
+                               "-L" "."
+                               "-l" "inspector-tests.el"
+                               "-l" "tree-inspector-tests.el"
+                               "-f" "ert-run-tests-batch-and-exit")
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'preserve-emacs-28-compatibility
+              ;; XXX: `cl-constantly' function is defined in "cl-lib" starting
+              ;; from Emacs 29+.  For now, replace it with its definition.
+              (lambda _
+                (substitute* "tree-inspector.el"
+                  (("cl-constantly") "lambda (_)"))))
+            (add-before 'check 'skip-failing-test
+              (lambda _
+                (substitute* "tree-inspector-tests.el"
+                  (("\\(ert-deftest inspector-tests--inspect-struct-test.*" all)
+                   (string-append all " (skip-unless nil)"))))))))
+      (native-inputs (list emacs-ert-runner))
       (propagated-inputs (list emacs-treeview))
       (home-page "https://github.com/mmontone/emacs-inspector")
       (synopsis "Inspection tool for Emacs Lisp objects")