lilyp pushed a commit to branch emacs-team
in repository guix.
commit 46364c1d135ff1d9549bb1ae285f605617cd1248
Author: Liliana Marie Prikler <[email protected]>
AuthorDate: Sun Mar 16 16:31:20 2025 +0100
gnu: emacs-gnuplot: Fix tests.
* gnu/packages/emacs-xyz.scm (emacs-gnuplot)[arguments]: Add #:test-command
and #:phases.
---
gnu/packages/emacs-xyz.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index bf1d9cf444..6f8cc1bb6e 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -22136,6 +22136,34 @@ gnugo-image-display-mode}.")
(sha256
(base32 "0s0k18ibi4b2vn6l7rwdk79g6ck6xafxzzbja8a8y0r8ljfssfgb"))))
(build-system emacs-build-system)
+ (arguments
+ (list #:test-command #~(list "make" "test"
+ ;; XXX: Do not load gnuplot-debug-context,
+ ;; because it requires gnuplot-test-context.
+ "LOAD=-l gnuplot -l gnuplot-context \
+ -l gnuplot-gui -l gnuplot-tests \
+ -l gnuplot-test-context")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'number-tests
+ (lambda _
+ ;; variant of ert-number-tests
+ (define (gnuplot-number-tests file test-name)
+ (emacs-batch-edit-file file
+ `(let ((i 0))
+ (while (re-search-forward
+ ,(string-append "gnuplot-test-comment "
+ test-name)
+ nil t)
+ (goto-char (match-beginning 0))
+ (kill-region (match-beginning 0) (match-end 0))
+ (insert (format "gnuplot-test-comment %s-%d"
+ ,test-name i))
+ (setq i (+ i 1)))
+ (basic-save-buffer))))
+ (gnuplot-number-tests
+ "gnuplot-tests.el"
+ "gnuplot-comment-with-single-quotes"))))))
(home-page "https://github.com/emacsorphanage/gnuplot-mode")
(synopsis "Emacs major mode for interacting with Gnuplot")
(description