From 6d382339de1c9fbe20ec056fb5200d5724a4aa44 Mon Sep 17 00:00:00 2001
From: Ludovic Courtès <ludo@gnu.org>
Date: Mon, 26 Jun 2017 22:23:11 +0200
Subject: profiles: Add 'manifest-transaction-removal-candidate?'.

* guix/profiles.scm (manifest-transaction-removal-candidate?): New
procedure.
* tests/profiles.scm ("manifest-transaction-removal-candidate?"): New
test.
---
 tests/profiles.scm | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'tests')

diff --git a/tests/profiles.scm b/tests/profiles.scm
index f731807e8c..469dde2652 100644
--- a/tests/profiles.scm
+++ b/tests/profiles.scm
@@ -197,6 +197,13 @@
 (test-assert "manifest-transaction-null?"
   (manifest-transaction-null? (manifest-transaction)))
 
+(test-assert "manifest-transaction-removal-candidate?"
+  (let ((m (manifest (list guile-2.0.9)))
+        (t (manifest-transaction
+            (remove (list (manifest-pattern (name "guile")))))))
+    (and (manifest-transaction-removal-candidate? guile-2.0.9 t)
+         (not (manifest-transaction-removal-candidate? glibc t)))))
+
 (test-assertm "profile-derivation"
   (mlet* %store-monad
       ((entry ->   (package->manifest-entry %bootstrap-guile))
-- 
cgit v1.2.3