]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Add testcase for the last commit
authorMichael Schroeder <mls@suse.de>
Tue, 18 Dec 2018 15:55:29 +0000 (16:55 +0100)
committerMichael Schroeder <mls@suse.de>
Tue, 18 Dec 2018 15:55:29 +0000 (16:55 +0100)
ext/testcase.c
test/testcases/strongrecommends/disfavored.t [new file with mode: 0644]

index 31fe4e9c30257944fab8a1c3f6e537e3ab37e4b7..7ec2f007385a8026ce13b369a7eeb9ca8e17e20e 100644 (file)
@@ -1818,6 +1818,7 @@ static struct rclass2str {
   { SOLVER_RULE_LEARNT, "learnt" },
   { SOLVER_RULE_BEST, "best" },
   { SOLVER_RULE_YUMOBS, "yumobs" },
+  { SOLVER_RULE_RECOMMENDS, "recommends" },
   { 0, 0 }
 };
 
diff --git a/test/testcases/strongrecommends/disfavored.t b/test/testcases/strongrecommends/disfavored.t
new file mode 100644 (file)
index 0000000..14792fa
--- /dev/null
@@ -0,0 +1,34 @@
+# test strong recommends
+#
+# with normal recommends, the solver will
+# not backtrack to fulfill them.
+#
+repo system 0 testtags <inline>
+#>=Pkg: A 1 1 noarch
+#>=Con: C
+#>=Pkg: A2 1 1 noarch
+#>=Con: C2
+repo available 0 testtags <inline>
+#>=Pkg: A 1 2 noarch
+#>=Pkg: B 1 1 noarch
+#>=Rec: C
+#>=Pkg: C 1 1 noarch
+#>=Pkg: B2 1 1 noarch
+#>=Rec: C2
+#>=Pkg: C2 1 1 noarch
+#>=Pkg: D 1 1 noarch
+#>=Prv: C
+#>=Pkg: E 1 1 noarch
+#>=Prv: C
+system i686 rpm system
+solverflags strongrecommends
+job install name B
+job install name B2
+job disfavor name C
+result transaction,problems,alternatives <inline>
+#>alternative 6b91d100  1 + D-1-1.noarch@available
+#>alternative 6b91d100  2   E-1-1.noarch@available
+#>install B-1-1.noarch@available
+#>install B2-1-1.noarch@available
+#>install D-1-1.noarch@available
+#>upgrade A-1-1.noarch@system A-1-2.noarch@available