lilyp pushed a commit to branch emacs-team
in repository guix.

commit 0af5adb8a607e94b3f98020810678f672d35f004
Author: Liliana Marie Prikler <liliana.prik...@gmail.com>
AuthorDate: Thu Mar 13 20:43:00 2025 +0100

    gnu: emacs-google-translate: Fix tests.
    
    * gnu/packages/emacs-xyz.scm (emacs-google-translate)[#:phases]:
    Add ‘disable-failing-tests’.
    [native-inputs]: Add emacs-el-mock and emacs-ert-runner.
---
 gnu/packages/emacs-xyz.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 7d2b13b49d..8c4d994fa8 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -30019,6 +30019,30 @@ conversion scenarios.")
         (base32
          "0rwpij2bm8d4jq2w5snkp88mfryplw8166dsrjm407n2p6xr48zx"))))
     (build-system emacs-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'check '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")) ...)))))
+                ;; These tests fail due to a missing requirement:
+                ;;   (void-function facemenu-set-face)
+                (disable-tests
+                 "test/google-translate-core-ui-test.el"
+                 ("test-google-translate--suggestion"
+                  "test-google-translate--text-phonetic/show-phonetic"
+                  "test-google-translate--translation-phonetic/show-phonetic"
+                  "test-google-translate--translated-text"))))))))
+    (native-inputs (list emacs-el-mock emacs-ert-runner))
     (home-page "https://github.com/atykhonov/google-translate";)
     (synopsis "Emacs interface to Google Translate")
     (description

Reply via email to