aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/profiles.scm22
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/profiles.scm b/tests/profiles.scm
index b2919d7315..e1f1eefee7 100644
--- a/tests/profiles.scm
+++ b/tests/profiles.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -26,7 +27,7 @@
#:use-module (ice-9 match)
#:use-module (srfi srfi-64))
-;; Test the (guix profile) module.
+;; Test the (guix profiles) module.
(define %store
(open-connection))
@@ -122,6 +123,25 @@
(_ #f))
(equal? m3 m4))))
+(test-assert "manifest-perform-transaction"
+ (let* ((m0 (manifest (list guile-2.0.9 guile-2.0.9:debug)))
+ (t1 (manifest-transaction
+ (install (list guile-1.8.8))
+ (remove (list (manifest-pattern (name "guile")
+ (output "debug"))))))
+ (t2 (manifest-transaction
+ (remove (list (manifest-pattern (name "guile")
+ (version "2.0.9")
+ (output #f))))))
+ (m1 (manifest-perform-transaction m0 t1))
+ (m2 (manifest-perform-transaction m1 t2))
+ (m3 (manifest-perform-transaction m0 t2)))
+ (and (match (manifest-entries m1)
+ ((($ <manifest-entry> "guile" "1.8.8" "out")) #t)
+ (_ #f))
+ (equal? m1 m2)
+ (null? (manifest-entries m3)))))
+
(test-assert "profile-derivation"
(run-with-store %store
(mlet* %store-monad