From f755403014e70d875541bcce5474d2cf410b5da1 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Tue, 12 Aug 2014 12:32:16 +0400 Subject: profiles: Add 'manifest-add'. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/profiles.scm (manifest-add): New procedure. * tests/profiles.scm (guile-1.8.8): New variable. ("manifest-add"): New test. Signed-off-by: Ludovic Courtès --- tests/profiles.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'tests') diff --git a/tests/profiles.scm b/tests/profiles.scm index d405f6453e..b2919d7315 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm @@ -40,6 +40,13 @@ (define guile-for-build ;; Example manifest entries. +(define guile-1.8.8 + (manifest-entry + (name "guile") + (version "1.8.8") + (item "/gnu/store/...") + (output "out"))) + (define guile-2.0.9 (manifest-entry (name "guile") @@ -101,6 +108,20 @@ (define guile-2.0.9:debug (null? (manifest-entries m3)) (null? (manifest-entries m4))))))) +(test-assert "manifest-add" + (let* ((m0 (manifest '())) + (m1 (manifest-add m0 (list guile-1.8.8))) + (m2 (manifest-add m1 (list guile-2.0.9))) + (m3 (manifest-add m2 (list guile-2.0.9:debug))) + (m4 (manifest-add m3 (list guile-2.0.9:debug)))) + (and (match (manifest-entries m1) + ((($ "guile" "1.8.8" "out")) #t) + (_ #f)) + (match (manifest-entries m2) + ((($ "guile" "2.0.9" "out")) #t) + (_ #f)) + (equal? m3 m4)))) + (test-assert "profile-derivation" (run-with-store %store (mlet* %store-monad -- cgit v1.2.3