From e4c65886dd1758657ccf58e14523c2da57f2c98a Mon Sep 17 00:00:00 2001
From: Timo Teräs <timo.teras@iki.fi>
Date: Wed, 19 Jun 2013 20:46:53 +0300
Subject: solver: properly order deletion of unneeded packages

---
 test/basic14.test         |  9 +++++++++
 test/installif1.installed | 27 +++++++++++++++++++++++++++
 test/installif4.test      | 11 +++++++++++
 test/pinning10.test       |  4 ++--
 4 files changed, 49 insertions(+), 2 deletions(-)
 create mode 100644 test/basic14.test
 create mode 100644 test/installif1.installed
 create mode 100644 test/installif4.test

(limited to 'test')

diff --git a/test/basic14.test b/test/basic14.test
new file mode 100644
index 0000000..bce402c
--- /dev/null
+++ b/test/basic14.test
@@ -0,0 +1,9 @@
+@ARGS
+--test-repo basic.repo
+--test-instdb basic.installed2
+--test-world a
+del a
+@EXPECT
+(1/2) Purging a (2)
+(2/2) Purging b (2)
+OK: 0 MiB in 2 packages
diff --git a/test/installif1.installed b/test/installif1.installed
new file mode 100644
index 0000000..551e65a
--- /dev/null
+++ b/test/installif1.installed
@@ -0,0 +1,27 @@
+C:Q1EyN5AdpAOBJWKMR89pp/C66o+OE=
+P:app
+V:1
+S:1
+I:1
+D:lib
+
+C:Q1eVpkasfqZAukAXFYbgwt4xAMZWU=
+P:lib
+V:1
+S:1
+I:1
+
+C:Q1C4uoV7SdMdDhYg4OCVmI71D8HIA=
+P:foo
+V:1
+S:1
+I:1
+
+C:Q16m4HrGizBiH4lG6Mxd5EL239L2U=
+P:appiif1
+V:1
+S:1
+I:1
+D:app
+i:app foo
+
diff --git a/test/installif4.test b/test/installif4.test
new file mode 100644
index 0000000..d3f54ee
--- /dev/null
+++ b/test/installif4.test
@@ -0,0 +1,11 @@
+@ARGS
+--test-repo installif1.repo
+--test-instdb installif1.installed
+--test-world app
+del app
+@EXPECT
+(1/4) Purging appiif1 (1)
+(2/4) Purging app (1)
+(3/4) Purging lib (1)
+(4/4) Purging foo (1)
+OK: 0 MiB in 4 packages
diff --git a/test/pinning10.test b/test/pinning10.test
index f8f6763..6097f99 100644
--- a/test/pinning10.test
+++ b/test/pinning10.test
@@ -5,6 +5,6 @@
 --test-world "a@testing"
 add a
 @EXPECT
-(1/2) Downgrading a (3 -> 2)
-(2/2) Purging c (3)
+(1/2) Purging c (3)
+(2/2) Downgrading a (3 -> 2)
 OK: 0 MiB in 3 packages
-- 
cgit v1.2.3-70-g09d2