Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix case-preserving environment updates on Windows #5356

Merged
merged 5 commits into from
Feb 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
reftest: add win32 env test
  • Loading branch information
rjbou committed Feb 7, 2023
commit 0ce4a16fb100c8f83d50a6aa1c6b5a1506bd2d15
20 changes: 20 additions & 0 deletions tests/reftests/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,26 @@
%{targets}
(run ./run.exe %{exe:../../src/client/opamMain.exe.exe} %{dep:env.test} %{read-lines:testing-env}))))

(rule
(alias reftest-env.win32)
(enabled_if (= %{os_type} "Win32"))
(action
(diff env.win32.test env.win32.out)))

(alias
(name reftest)
(enabled_if (= %{os_type} "Win32"))
(deps (alias reftest-env.win32)))

(rule
(targets env.win32.out)
(deps root-N0REP0)
(enabled_if (= %{os_type} "Win32"))
(action
(with-stdout-to
%{targets}
(run ./run.exe %{exe:../../src/client/opamMain.exe.exe} %{dep:env.win32.test} %{read-lines:testing-env}))))

(rule
(alias reftest-init)
(action
Expand Down
16 changes: 16 additions & 0 deletions tests/reftests/env.win32.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
N0REP0
### <pkg:vne.1>
opam-version: "2.0"
setenv: [ Foo += "bar" ]
### opam switch create --empty test
### FOO=foo
### opam install vne
The following actions will be performed:
=== install 1 package
- install vne 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed vne.1
Done.
### opam env | grep 'Foo|FOO' | "SET " -> "" | "'" -> "" | '; .*' -> ""
Foo=bar;foo