From 1d64afbdc0644a2be8bd2ad157085731e212ab74 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Sun, 24 Nov 2019 20:47:20 +0100
Subject: [PATCH] =?UTF-8?q?tests:=20Avoid=20(catch=20'srfi-34=20=E2=80=A6)?=
 =?UTF-8?q?=20form.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* tests/build-utils.scm ("wrap-script, raises condition"): Use 'guard'
instead of "catch 'srfi-34".
---
 tests/build-utils.scm | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/tests/build-utils.scm b/tests/build-utils.scm
index 61e6c44e632..ec442c267b1 100644
--- a/tests/build-utils.scm
+++ b/tests/build-utils.scm
@@ -235,13 +235,11 @@ (define-module (test-build-utils)
          (lambda (port)
            (format port "This is not a script")))
        (chmod script-file-name #o777)
-       (catch 'srfi-34
-         (lambda ()
-           (wrap-script script-file-name
-                        #:guile "MYGUILE"
-                        `("GUIX_FOO" prefix ("/some/path"
-                                             "/some/other/path"))))
-         (lambda (type obj)
-           (wrap-error? obj)))))))
+       (guard (c ((wrap-error? c) #t))
+         (wrap-script script-file-name
+                      #:guile "MYGUILE"
+                      `("GUIX_FOO" prefix ("/some/path"
+                                           "/some/other/path")))
+         #f)))))
 
 (test-end)
-- 
GitLab