Skip to content

Commit

Permalink
Actions output change: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AltGr committed Feb 8, 2022
1 parent e3b740e commit 8cd78ef
Show file tree
Hide file tree
Showing 20 changed files with 702 additions and 599 deletions.
44 changes: 28 additions & 16 deletions tests/reftests/avoid-version.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ flags: avoid-version
### OPAMYES=1
### opam install a --show
The following actions would be faked:
- install a 2
== install 1 package: ==
- install a 2
### <pkg:a.1>
opam-version: "2.0"
### opam install a
The following actions will be faked:
- install a 1
== install 1 package: ==
- install a 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Faking installation of a.1
Expand All @@ -28,7 +30,8 @@ Nothing to do.
opam-version: "2.0"
### opam upgrade a
The following actions will be faked:
- upgrade a 1 to 1.1
== upgrade 1 package: ==
- upgrade a 1 to 1.1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Faking installation of a.1.1
Expand All @@ -37,21 +40,24 @@ Done.
opam-version: "2.0"
### opam upgrade a
The following actions will be faked:
- upgrade a 1.1 to 3
== upgrade 1 package: ==
- upgrade a 1.1 to 3

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Faking installation of a.3
Done.
### opam install a.2
The following actions will be faked:
- downgrade a 3 to 2
== downgrade 1 package: ==
- downgrade a 3 to 2

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Faking installation of a.2
Done.
### opam upgrade a
The following actions will be faked:
- upgrade a 2 to 3
== upgrade 1 package: ==
- upgrade a 2 to 3

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Faking installation of a.3
Expand All @@ -64,7 +70,8 @@ opam-version: "2.0"
depends: "a" {= "2"}
### opam install b
The following actions will be faked:
- install b 1
== install 1 package: ==
- install b 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Faking installation of b.1
Expand All @@ -78,19 +85,21 @@ However, you may "opam upgrade" these packages explicitly, which will ask permis
Nothing to do.
### opam upgrade b
The following actions will be faked:
- downgrade a 3 to 2 [required by b]
- upgrade b 1 to 2
===== 1 to upgrade | 1 to downgrade =====
== downgrade 1 package: ==
- downgrade a 3 to 2 [required by b]
== upgrade 1 package: ==
- upgrade b 1 to 2

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Faking installation of a.2
Faking installation of b.2
Done.
### opam upgrade
The following actions will be faked:
- upgrade a 2 to 3
- downgrade b 2 to 1 [uses a]
===== 1 to upgrade | 1 to downgrade =====
== downgrade 1 package: ==
- downgrade b 2 to 1 [uses a]
== upgrade 1 package: ==
- upgrade a 2 to 3

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Faking installation of a.3
Expand All @@ -112,21 +121,24 @@ However, you may "opam upgrade" these packages explicitly, which will ask permis
Nothing to do.
### opam upgrade b.3
The following actions will be faked:
- upgrade b 1 to 3
== upgrade 1 package: ==
- upgrade b 1 to 3

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Faking installation of b.3
Done.
### opam install a.2
The following actions will be faked:
- downgrade a 3 to 2
== downgrade 1 package: ==
- downgrade a 3 to 2

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Faking installation of a.2
Done.
### opam upgrade
The following actions will be faked:
- upgrade a 2 to 4
== upgrade 1 package: ==
- upgrade a 2 to 4

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Faking installation of a.4
Expand Down
21 changes: 14 additions & 7 deletions tests/reftests/clean.test
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ install: [
### opam switch create clean --empty
### opam install things
The following actions will be performed:
- install things 1
== install 1 package: ==
- install things 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed things.1
Expand All @@ -25,27 +26,31 @@ ${BASEDIR}/OPAM/clean/lib/things/second

### opam remove things
The following actions will be performed:
- remove things 1
== remove 1 package: ==
- remove things 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed things.1
Done.
### opam install things
The following actions will be performed:
- install things 1
== install 1 package: ==
- install things 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed things.1
Done.
### opam remove things --fake
The following actions will be faked:
- remove things 1
== remove 1 package: ==
- remove things 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Done.
### opam install things
The following actions will be performed:
- install things 1
== install 1 package: ==
- install things 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The installation of things failed at "test ! -f ${BASEDIR}/OPAM/clean/bin/first".
Expand Down Expand Up @@ -78,7 +83,8 @@ Remaining directories and files:
Remove them? [Y/n] y
### opam install things
The following actions will be performed:
- install things 1
== install 1 package: ==
- install things 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed things.1
Expand All @@ -87,7 +93,8 @@ Done.
another content
### opam remove things --no | '\\' -> '/'
The following actions will be performed:
- remove things 1
== remove 1 package: ==
- remove things 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
While removing things.1: these files have been modified since installation:
Expand Down
24 changes: 16 additions & 8 deletions tests/reftests/cli-versioning.test
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ opam: install was removed in version 2.1 of the opam CLI, but version 2.2 has be
# Return code 2 #
### opam install baz --assume-depexts --cli 2.1
The following actions would be performed:
- install baz 2
== install 1 package: ==
- install baz 2
### OPAMCLI=2.0 opam install baz --assume-depexts
opam: --assume-depexts was added in version 2.1 of the opam CLI, but version 2.0 has been requested, which is older.
# Return code 2 #
Expand Down Expand Up @@ -54,11 +55,13 @@ opam: --update-invariant was added in version 2.1 of the opam CLI, but version 2
# Return code 2 #
### opam install baz.2 --update-invariant
The following actions would be performed:
- install baz 2
== install 1 package: ==
- install baz 2
### OPAMCLI=2.0 opam install baz.2 --unlock-base
[WARNING] OPAMNODEPEXTS was ignored because CLI 2.0 was requested and it was introduced in 2.1.
The following actions would be performed:
- install baz 2
== install 1 package: ==
- install baz 2
### opam install baz.2 --unlock-base
opam: --unlock-base was removed in version 2.1 of the opam CLI, but version 2.2 has been requested. Use --update-invariant instead or set OPAMCLI environment variable to 2.0.
# Return code 2 #
Expand Down Expand Up @@ -100,28 +103,32 @@ remove: ["sh" "-c" "env | grep -qFx 'OPAMCLI=2.1'"]
The switch invariant was set to []
### opam install env-2-0
The following actions will be performed:
- install env-2-0 1
== install 1 package: ==
- install env-2-0 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed env-2-0.1
Done.
### opam install env-2-1
The following actions will be performed:
- install env-2-1 1
== install 1 package: ==
- install env-2-1 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed env-2-1.1
Done.
### opam remove env-2-0
The following actions will be performed:
- remove env-2-0 1
== remove 1 package: ==
- remove env-2-0 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed env-2-0.1
Done.
### opam remove env-2-1
The following actions will be performed:
- remove env-2-1 1
== remove 1 package: ==
- remove env-2-1 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed env-2-1.1
Expand All @@ -146,4 +153,5 @@ ${BASEDIR}/OPAM/cli-versioning/share
<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><><><>
Switch invariant: ["baz" "baz" {= "2"}]
The following actions would be performed:
- install baz 2
== install 1 package: ==
- install baz 2
Loading

0 comments on commit 8cd78ef

Please # to comment.