Skip to content

Commit

Permalink
reftest: add a test showing the behaviour of opam repository remove w…
Browse files Browse the repository at this point in the history
…hen given unknown repositories
  • Loading branch information
kit-ty-kate committed Aug 12, 2024
1 parent 6dbcfe7 commit ebbcea2
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions tests/reftests/repository.test
Original file line number Diff line number Diff line change
Expand Up @@ -607,3 +607,36 @@ opam-version: "2.0"
[to-many-commits] Initialised
### git -C ./OPAM/repo/to-many-commits rev-list --all --count
1
### : Check the behaviour of opam repository remove when given unknown repositories
### opam repository --all
# Repository # Url # Switches(rank)
oper file://${BASEDIR}/OPER3 <default> repos(3/3) tarring(1/2)
oper3 file://${BASEDIR}/OPER3 repos(2/3)
repo2 file://${BASEDIR}/REPO2 tarring(2/2)
to-many-commits git+file://${BASEDIR}/TMCS repos(1/3)
### opam repository
[NOTE] These are the repositories in use by the current switch. Use '--all' to see all configured repositories.

<><> Repository configuration for switch repos ><><><><><><><><><><><><><><><><>
1 to-many-commits git+file://${BASEDIR}/TMCS
2 oper3 file://${BASEDIR}/OPER3
3 oper file://${BASEDIR}/OPER3
### opam repository remove does-not-exist
Repositories removed from the selections of switch repos. Use '--all' to forget about them altogether.
### opam repository remove does-not-exist --all
[WARNING] No configured repositories by these names found: does-not-exist
### opam repository remove does-not-exist oper
Repositories removed from the selections of switch repos. Use '--all' to forget about them altogether.
### opam repository remove does-not-exist repo2 --all
[WARNING] No configured repositories by these names found: does-not-exist
### opam repository --all
# Repository # Url # Switches(rank)
oper file://${BASEDIR}/OPER3 <default> tarring
oper3 file://${BASEDIR}/OPER3 repos(2/2)
to-many-commits git+file://${BASEDIR}/TMCS repos(1/2)
### opam repository
[NOTE] These are the repositories in use by the current switch. Use '--all' to see all configured repositories.

<><> Repository configuration for switch repos ><><><><><><><><><><><><><><><><>
1 to-many-commits git+file://${BASEDIR}/TMCS
2 oper3 file://${BASEDIR}/OPER3

0 comments on commit ebbcea2

Please sign in to comment.