summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2023-03-24 10:06:10 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2023-03-24 10:06:10 +0100
commit094f11d20299d2860aa4b13ff3c634b43451b990 (patch)
tree950a5c2e7cd258265ba2a966ee53260b6ab67113
parentf1f6da322631ea629ac69450cf7e312760d2258d (diff)
gnu: emacs-php-mode: Run tests.
* gnu/packages/emacs-xyz.scm (emacs-php-mode)[argument]: Use G-expressions. Run tests.
-rw-r--r--gnu/packages/emacs-xyz.scm20
1 files changed, 15 insertions, 5 deletions
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 09787a5158..e57701714a 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -17254,11 +17254,21 @@ in Emacs.")
(base32 "01yw10z1kf38nz4z3gmpx56wmc7a7caf4nk6rccg0w4kklqw1h94"))))
(build-system emacs-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'enter-source-directory
- (lambda _
- (chdir "lisp"))))))
+ (list
+ #:tests? #true
+ #:test-command #~(list "emacs" "-Q" "--batch"
+ "-l" "../tests/php-mode-test.el"
+ "-f" "ert-run-tests-batch-and-exit")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'prepare-testing-bed
+ (lambda _
+ ;; This file is necessary for `php-project-root' test.
+ (call-with-output-file "tests/project/1/.git"
+ (const #t))))
+ (add-after 'prepare-testing-bed 'enter-source-directory
+ (lambda _
+ (chdir "lisp"))))))
(propagated-inputs (list emacs-projectile))
(home-page "https://github.com/ejmr/php-mode")
(synopsis "Major mode for editing PHP code")