Skip to content

Commit

Permalink
reftest: Add a test showing the output of opam update in verbose mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kit-ty-kate authored and dra27 committed Jun 9, 2024
1 parent 67af380 commit fe46d0c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/reftests/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1436,6 +1436,24 @@
%{targets}
(run ./run.exe %{exe:../../src/client/opamMain.exe.exe} %{dep:update-upgrade.test} %{read-lines:testing-env}))))

(rule
(alias reftest-update)
(action
(diff update.test update.out)))

(alias
(name reftest)
(deps (alias reftest-update)))

(rule
(targets update.out)
(deps root-N0REP0)
(package opam)
(action
(with-stdout-to
%{targets}
(run ./run.exe %{exe:../../src/client/opamMain.exe.exe} %{dep:update.test} %{read-lines:testing-env}))))

(rule
(alias reftest-upgrade-format)
(action
Expand Down
9 changes: 9 additions & 0 deletions tests/reftests/update.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
N0REP0
### <REPO/packages/pkg/pkg.1/opam>
opam-version: "2.0"
### opam update --verbose

<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
Processing 1/1: [default: rsync]
[default] synchronised from file://${BASEDIR}/REPO
Now run 'opam upgrade' to apply any package updates.

0 comments on commit fe46d0c

Please sign in to comment.