Debian Codegraph @

test/blackbox-tests/test-cases/pkg/search/multiple-repos.t

raw
1 Source helpers for creating another repo, etc.
2
3 We setup a couple of different mock repositories. First, create
4 mock-opam-repository with a couple of packages
5
6 $ mkrepo
7 $ mkpkg foo
8 $ mkpkg bar <<EOF
9 > depends: [ "foo" {>= "0.0.1"} ]
10 > synopsis: "Mock bar package that depends on foo."
11 > EOF
12
13 Next, create other-opam-repository with a package
14
15 $ mkrepo_other
16 $ mkpkg_other baz
17
18 Create a dune-workspace with both the mock repositories added
19
20 $ create_dune_workspace_with_mock_repos
21
22 Search for all packages
23
24 $ dune pkg search
25 - bar 0.0.1 Mock bar package that depends on foo.
26 - baz 0.0.1 (no synopsis)
27 - foo 0.0.1 (no synopsis)
28
29 Search with a query argument -- exact name
30
31 $ dune pkg search foo
32 - foo 0.0.1 (no synopsis)
33
34 Another search with a query argument - substring of package name
35
36 $ dune pkg search ar
37 - bar 0.0.1 Mock bar package that depends on foo.
38
39 Search for package in other repo
40
41 $ dune pkg search baz
42 - baz 0.0.1 (no synopsis)
43
44 Search with results from both repos
45
46 $ dune pkg search ba
47 - bar 0.0.1 Mock bar package that depends on foo.
48 - baz 0.0.1 (no synopsis)
49
50 Search with no results
51
52 $ dune pkg search dune
53 Error: No packages found matching "dune".
54 [1]