From 45542a0d5ed05ed8e4d0f699430ce90fa5fdaadc Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sat, 28 Jan 2023 15:51:05 +0100 Subject: gnu: emacs-org-cliplink: Fix randomly failing build. * gnu/packages/emacs-xyz.scm (emacs-org-cliplink)[arguments]<#:phases>: Fix a randomly failing test. --- gnu/packages/emacs-xyz.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gnu') diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index a9810efab6..8052f2b3ba 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -35183,7 +35183,14 @@ the buffer you want to undo. An undo tree buffer should pop up.") (substitute* "org-cliplink-transport.el" (("\\(executable-find \"curl\"\\)") (let ((curl (search-input-file inputs "/bin/curl"))) - (string-append "\"" curl "\""))))))))) + (string-append "\"" curl "\"")))))) + (add-before 'check 'fix-failing-test + ;; XXX: Fix randomly (!) failing test, which doesn't account for + ;; the fact that (random) may return a negative number. + (lambda _ + (substitute* "test/org-cliplink-transport-test.el" + (("curl-rexim.me-\\[a-z0-9\\]\\+") + "curl-rexim.me--?[a-z0-9]+"))))))) (native-inputs (list emacs-el-mock emacs-ert-runner emacs-undercover)) (inputs -- cgit v1.2.3