guix-commits
[Top][All Lists]
Advanced

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

01/01: gnu: emacs-adoc-mode: Enable tests.


From: guix-commits
Subject: 01/01: gnu: emacs-adoc-mode: Enable tests.
Date: Fri, 1 Nov 2019 22:15:11 -0400 (EDT)

apteryx pushed a commit to branch master
in repository guix.

commit 44d1cce5573eca7d3fa7cca663f289072e65bcc1
Author: Maxim Cournoyer <address@hidden>
Date:   Fri Nov 1 21:37:37 2019 -0400

    gnu: emacs-adoc-mode: Enable tests.
    
    * gnu/packages/emacs-xyz.scm (emacs-adoc-mode)[source]: Fetch sources from
    Git, as there are no tests in the MELPA release.
    [arguments]: Enable tests and specify the test command.
    {phases}: Add a 'disable-failing-tests phase.
---
 gnu/packages/emacs-xyz.scm | 36 ++++++++++++++++++++++++++++++++----
 1 file changed, 32 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 6f584f7..d02c163 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -15869,13 +15869,41 @@ and 'text viewing modes' respectively.")
     (version "0.6.6")
     (source
      (origin
-       (method url-fetch)
-       (uri (string-append "https://stable.melpa.org/packages/adoc-mode-";
-                           version ".el"))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/sensorflo/adoc-mode.git";)
+             (commit (string-append "V" version))))
+       (file-name (git-file-name name version))
        (sha256
         (base32
-         "1c6hrgxxsnl2c19rgjykpm7r4xg9lp6bmk5z6bi7g8pqlrgwffcy"))))
+         "0kp2aafjhqxz3mjr9hkkss85r4n51chws5a2qj1xzb63dh36liwm"))))
     (build-system emacs-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; See: https://github.com/sensorflo/adoc-mode/issues/39.
+         (add-after 'unpack 'disable-failing-tests
+           (lambda _
+             (let-syntax
+                 ((disable-tests
+                   (syntax-rules ()
+                     ((_ file ())
+                      (syntax-error "test names list must not be empty"))
+                     ((_ file (test-name ...))
+                      (substitute* file
+                        (((string-append "^\\(ert-deftest " test-name ".*") 
all)
+                         (string-append all "(skip-unless nil)\n")) ...)))))
+               (disable-tests "adoc-mode-test.el"
+                              ("adoctest-test-tempo-delimited-blocks"
+                               "adoctest-test-tempo-macros"
+                               "adoctest-test-tempo-paragraphs"
+                               "adoctest-test-tempo-passthroug-macros"
+                               "adoctest-test-tempo-quotes")))
+             #t)))
+       #:tests? #t
+       #:test-command '("emacs" "-Q" "-batch"
+                        "-l" "adoc-mode-test.el"
+                        "-f" "ert-run-tests-batch-and-exit")))
     (propagated-inputs
      `(("emacs-markup-faces" ,emacs-markup-faces)))
     (home-page "https://github.com/sensorflo/adoc-mode/wiki";)



reply via email to

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