Skip to content

Commit 9484393

Browse files
committed
reftest: add init with space in windows test
1 parent 953441f commit 9484393

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

tests/reftests/dune.inc

+20
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,26 @@
498498
%{targets}
499499
(run ./run.exe %{exe:../../src/client/opamMain.exe.exe} %{dep:init.test} %{read-lines:testing-env}))))
500500

501+
(rule
502+
(alias reftest-init.win32)
503+
(enabled_if (= %{os_type} "Win32"))
504+
(action
505+
(diff init.win32.test init.win32.out)))
506+
507+
(alias
508+
(name reftest)
509+
(enabled_if (= %{os_type} "Win32"))
510+
(deps (alias reftest-init.win32)))
511+
512+
(rule
513+
(targets init.win32.out)
514+
(deps root-N0REP0)
515+
(enabled_if (= %{os_type} "Win32"))
516+
(action
517+
(with-stdout-to
518+
%{targets}
519+
(run ./run.exe %{exe:../../src/client/opamMain.exe.exe} %{dep:init.win32.test} %{read-lines:testing-env}))))
520+
501521
(rule
502522
(alias reftest-inplace)
503523
(action

tests/reftests/init.win32.test

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
N0REP0
2+
### : Redirection :
3+
### rm -rf $OPAMROOT
4+
### OPAMROOT="roots/with path"
5+
### opam init -na --bare --bypass-checks default REPO/
6+
No configuration file found, using built-in defaults.
7+
[NOTE] Your opam root path '${BASEDIR}/roots/with path' contains a space, we'll redirect to '/tmp/opamroot'
8+
9+
<><> Fetching repository information ><><><><><><><><><><><><><><><><><><><><><>
10+
[default] Initialised
11+
### opam var root --debug --debug-level=-1
12+
CLI Parsing CLI version 2.2
13+
GSTATE LOAD-GLOBAL-STATE @ C:\tmp\opamroot
14+
C:\tmp\opamroot
15+
### cat 'roots/with path/redirected-opamroot'
16+
/tmp/opamroot
17+
### opam switch create --empty test
18+
### opam switch --debug --debug-level=-1
19+
CLI Parsing CLI version 2.2
20+
GSTATE LOAD-GLOBAL-STATE @ C:\tmp\opamroot
21+
SWITCH list
22+
# switch compiler description
23+
-> test test
24+
### echo $OPAMROOT
25+
roots/with path

0 commit comments

Comments
 (0)