From 799f066768bacb321ebad84c75b2bbfd269e7cd8 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 8 Dec 2020 22:58:37 +0100 Subject: import: opam: Adjust test to latest 'opam->guix-package' changes. This is a followup to a8dccd4bdc1e58219d4ba08fe1649bf0b8325f44, which broke the test. * guix/import/opam.scm (get-opam-repository): Prevent inlining. * tests/opam.scm ("opam->guix-package"): Mock 'get-opam-repository'. --- guix/import/opam.scm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'guix/import/opam.scm') diff --git a/guix/import/opam.scm b/guix/import/opam.scm index 54143f83ca..670973b193 100644 --- a/guix/import/opam.scm +++ b/guix/import/opam.scm @@ -141,6 +141,9 @@ path to the repository." (string-append location "/" (substring (symbol->string repo) 4))) (else location))))) +;; Prevent Guile 3 from inlining this procedure so we can mock it in tests. +(set! get-opam-repository get-opam-repository) + (define (latest-version versions) "Find the most recent version from a list of versions." (fold (lambda (a b) (if (version>? a b) a b)) (car versions) versions)) -- cgit v1.2.3