guix-commits
[Top][All Lists]
Advanced

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

branch master updated: tests: build-emacs-utils: Allow test to pass on E


From: guix-commits
Subject: branch master updated: tests: build-emacs-utils: Allow test to pass on Emacs 27 too.
Date: Wed, 13 Jul 2022 10:50:25 -0400

This is an automated email from the git hooks/post-receive script.

apteryx pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new dcf133587a tests: build-emacs-utils: Allow test to pass on Emacs 27 
too.
dcf133587a is described below

commit dcf133587ac7d73ba306a314e1a496a7efb9960b
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Wed Jul 13 10:21:38 2022 -0400

    tests: build-emacs-utils: Allow test to pass on Emacs 27 too.
    
    * tests/build-emacs-utils.scm
    ("emacs-batch-script: raise &emacs-batch-error on failure"): More loosely
    match expected error string, which differs between Emacs 27 and Emacs 28.
---
 tests/build-emacs-utils.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/build-emacs-utils.scm b/tests/build-emacs-utils.scm
index 081032285a..4e851ed959 100644
--- a/tests/build-emacs-utils.scm
+++ b/tests/build-emacs-utils.scm
@@ -23,6 +23,7 @@
   #:use-module (guix build utils)
   #:use-module ((guix utils)
                 #:select (call-with-temporary-directory))
+  #:use-module (ice-9 regex)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-64))
 
@@ -36,8 +37,10 @@
 
 (test-assert "emacs-batch-script: raise &emacs-batch-error on failure"
   (guard (c ((emacs-batch-error? c)
-             (string-contains (emacs-batch-error-message c)
-                              "Lisp error: (wrong-type-argument numberp 
\"three\")")))
+             ;; The error message format changed between Emacs 27 and Emacs
+             ;; 28.
+             (string-match "[Ww]rong.*argument.*numberp.*\"three\""
+                           (emacs-batch-error-message c))))
     (emacs-batch-script '(mapcar 'number-to-string (list 1 2 "three")))))
 
 (call-with-temporary-directory



reply via email to

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