]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Add selection testcases
authorMichael Schroeder <mls@suse.de>
Thu, 16 Nov 2017 10:50:57 +0000 (11:50 +0100)
committerMichael Schroeder <mls@suse.de>
Thu, 16 Nov 2017 10:50:57 +0000 (11:50 +0100)
test/testcases/selection/selection_matchdeps.t [new file with mode: 0644]
test/testcases/selection/selection_name.t [new file with mode: 0644]
test/testcases/selection/selection_provides.t [new file with mode: 0644]

diff --git a/test/testcases/selection/selection_matchdeps.t b/test/testcases/selection/selection_matchdeps.t
new file mode 100644 (file)
index 0000000..cdf9ebc
--- /dev/null
@@ -0,0 +1,54 @@
+repo available 0 testtags <inline>
+#>=Pkg: A 2 1 noarch
+#>=Pkg: AP 3 1 noarch
+#>=Prv: A = 3.1
+#>=Pkg: A 2 2 i686
+#>=Req: BBB > 5
+#>=Pkg: B 1 1 src
+#>=Pkg: A 2 2 badarch
+system i686 rpm
+
+job noop selection_matchdeps solvable:name a = 2 rel,flat,nocase
+result jobs <inline>
+#>job noop oneof A-2-1.noarch@available A-2-2.i686@available
+
+nextjob
+job noop selection_matchdeps solvable:name a = 2-* flat,glob,nocase,depstr
+result jobs <inline>
+#>job noop oneof A-2-1.noarch@available A-2-2.i686@available
+
+nextjob
+job noop selection_matchdepid solvable:name A = 2-1 flat
+result jobs <inline>
+#>job noop pkg A-2-1.noarch@available [noautoset]
+
+nextjob
+job noop selection_matchdepid solvable:name A = 2-2 flat,depstr
+result jobs <inline>
+#>job noop pkg A-2-2.i686@available [noautoset]
+
+nextjob
+job noop selection_matchdepid solvable:name A = 2-2 flat,depstr,withbadarch
+result jobs <inline>
+#>job noop oneof A-2-2.i686@available A-2-2.badarch@available
+
+nextjob
+job noop selection_matchdeps solvable:requires bbb < 10 rel,flat,nocase
+result jobs <inline>
+#>job noop pkg A-2-2.i686@available [noautoset]
+
+nextjob
+job noop selection_matchdeps solvable:requires bbb >* depstr,glob,flat,nocase
+result jobs <inline>
+#>job noop pkg A-2-2.i686@available [noautoset]
+
+nextjob
+job noop selection_matchdepid solvable:requires BBB < 10 flat
+result jobs <inline>
+#>job noop pkg A-2-2.i686@available [noautoset]
+
+nextjob
+job noop selection_matchdepid solvable:requires BBB > 5 flat,depstr
+result jobs <inline>
+#>job noop pkg A-2-2.i686@available [noautoset]
+
diff --git a/test/testcases/selection/selection_name.t b/test/testcases/selection/selection_name.t
new file mode 100644 (file)
index 0000000..a12386f
--- /dev/null
@@ -0,0 +1,34 @@
+repo available 0 testtags <inline>
+#>=Pkg: A 2 1 noarch
+#>=Pkg: AP 3 1 noarch
+#>=Prv: A = 3.1
+#>=Pkg: A 2 2 i686
+#>=Req: BBB > 5
+#>=Pkg: B 1 1 src
+#>=Pkg: A 2 2 badarch
+system i686 rpm
+
+job noop selection A name
+result jobs <inline>
+#>job noop name A
+
+nextjob
+job noop selection A.i686 name,dotarch
+result jobs <inline>
+#>job noop name A . i686 [setarch]
+
+nextjob
+job noop selection A.i686>1 name,dotarch,rel
+result jobs <inline>
+#>job noop name (A . i686) > 1 [setarch]
+
+nextjob
+job noop selection B* glob,name,withsource
+result jobs <inline>
+#>job noop pkg B-1-1.src@available [noautoset]
+
+nextjob
+job noop selection A=2-2 name,dotarch,rel,withbadarch
+result jobs <inline>
+#>job noop oneof A-2-2.i686@available A-2-2.badarch@available [setevr]
+
diff --git a/test/testcases/selection/selection_provides.t b/test/testcases/selection/selection_provides.t
new file mode 100644 (file)
index 0000000..87e523a
--- /dev/null
@@ -0,0 +1,36 @@
+repo available 0 testtags <inline>
+#>=Pkg: A 2 1 noarch
+#>=Pkg: AP 3 1 noarch
+#>=Prv: A = 3.1
+#>=Pkg: A 2 2 i686
+#>=Req: BBB > 5
+#>=Pkg: B 1 1 src
+#>=Pkg: A 2 2 badarch
+system i686 rpm
+
+job noop selection A provides
+result jobs <inline>
+#>job noop provides A
+
+nextjob
+job noop selection A.i686 provides,dotarch
+result jobs <inline>
+#>job noop provides A . i686 [setarch]
+
+nextjob
+job noop selection A.i686>1 provides,dotarch,rel
+result jobs <inline>
+#>job noop provides (A . i686) > 1 [setarch]
+
+nextjob
+job noop selection A* glob,provides,withbadarch
+result jobs <inline>
+#>job noop provides A
+#>job noop provides AP
+
+nextjob
+job noop selection A*>=2 glob,provides,dotarch,rel,withbadarch
+result jobs <inline>
+#>job noop oneof A-2-1.noarch@available AP-3-1.noarch@available A-2-2.i686@available A-2-2.badarch@available
+#>job noop provides AP >= 2
+