Mercurial > vim
annotate src/testdir/test_windows_home.vim @ 32464:f2138180c6f0
patch 9.0.1563: GTK3: window manager resize hints are incomplete
Commit: https://github.com/vim/vim/commit/c0da540466c89e388e7a15a12bab2f9fc42d9671
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue May 16 22:15:51 2023 +0100
patch 9.0.1563: GTK3: window manager resize hints are incomplete
Problem: GTK3: window manager resize hints are incomplete.
Solution: Use NULL for second argument of gtk_window_set_geometry_hints().
(Kenny Stauffer closes #11055)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 17 May 2023 00:00:04 +0200 |
parents | 08940efa6b4e |
children | 1ee567e88a22 |
rev | line source |
---|---|
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Test for $HOME on Windows. |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
17663
403ac78df9a0
patch 8.1.1829: difference in screenshots
Bram Moolenaar <Bram@vim.org>
parents:
17089
diff
changeset
|
3 source check.vim |
403ac78df9a0
patch 8.1.1829: difference in screenshots
Bram Moolenaar <Bram@vim.org>
parents:
17089
diff
changeset
|
4 CheckMSWindows |
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 let s:env = {} |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 func s:restore_env() |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 for i in keys(s:env) |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 exe 'let ' . i . '=s:env["' . i . '"]' |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 endfor |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 endfunc |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 func s:save_env(...) |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 for i in a:000 |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 exe 'let s:env["' . i . '"]=' . i |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 endfor |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 endfunc |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 func s:unlet_env(...) |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 for i in a:000 |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 exe 'let ' . i . '=""' |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 endfor |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 endfunc |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 func CheckHomeIsMissingFromSubprocessEnvironment() |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 silent! let out = system('set') |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 let env = filter(split(out, "\n"), 'v:val=~"^HOME="') |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 call assert_equal(0, len(env)) |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 endfunc |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 func CheckHomeIsInSubprocessEnvironment(exp) |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 silent! let out = system('set') |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 let env = filter(split(out, "\n"), 'v:val=~"^HOME="') |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 let home = len(env) == 0 ? "" : substitute(env[0], '[^=]\+=', '', '') |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
36 call assert_equal(a:exp, home) |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 endfunc |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 func CheckHome(exp, ...) |
12275
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
40 call assert_equal(a:exp, $HOME) |
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
41 call assert_equal(a:exp, expand('~', ':p')) |
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
42 if !a:0 |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
43 call CheckHomeIsMissingFromSubprocessEnvironment() |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
44 else |
12275
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
45 call CheckHomeIsInSubprocessEnvironment(a:1) |
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
46 endif |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
47 endfunc |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
48 |
12275
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
49 func Test_WindowsHome() |
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
50 command! -nargs=* SaveEnv call <SID>save_env(<f-args>) |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
51 command! -nargs=* RestoreEnv call <SID>restore_env() |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
52 command! -nargs=* UnletEnv call <SID>unlet_env(<f-args>) |
12275
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
53 set noshellslash |
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
54 |
12275
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
55 let save_home = $HOME |
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
56 SaveEnv $USERPROFILE $HOMEDRIVE $HOMEPATH |
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
57 try |
12275
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
58 " Normal behavior: use $HOMEDRIVE and $HOMEPATH, ignore $USERPROFILE |
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
59 let $USERPROFILE = 'unused' |
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
60 let $HOMEDRIVE = 'C:' |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
61 let $HOMEPATH = '\foobar' |
12275
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
62 let $HOME = '' " Force recomputing "homedir" |
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
63 call CheckHome('C:\foobar') |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
64 |
12275
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
65 " Same, but with $HOMEPATH not set |
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
66 UnletEnv $HOMEPATH |
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
67 let $HOME = '' " Force recomputing "homedir" |
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
68 call CheckHome('C:\') |
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
69 |
12275
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
70 " Use $USERPROFILE if $HOMEPATH and $HOMEDRIVE are empty |
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
71 UnletEnv $HOMEDRIVE $HOMEPATH |
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
72 let $USERPROFILE = 'C:\foo' |
12275
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
73 let $HOME = '' " Force recomputing "homedir" |
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
74 call CheckHome('C:\foo') |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
75 |
12275
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
76 " If $HOME is set the others don't matter |
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
77 let $HOME = 'C:\bar' |
12275
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
78 let $USERPROFILE = 'unused' |
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
79 let $HOMEDRIVE = 'unused' |
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
80 let $HOMEPATH = 'unused' |
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
81 call CheckHome('C:\bar', 'C:\bar') |
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
82 |
12275
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
83 " If $HOME contains %USERPROFILE% it is expanded |
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
84 let $USERPROFILE = 'C:\foo' |
12275
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
85 let $HOME = '%USERPROFILE%\bar' |
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
86 let $HOMEDRIVE = 'unused' |
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
87 let $HOMEPATH = 'unused' |
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
88 call CheckHome('C:\foo\bar', '%USERPROFILE%\bar') |
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
89 |
12275
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
90 " Invalid $HOME is kept |
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
91 let $USERPROFILE = 'C:\foo' |
12275
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
92 let $HOME = '%USERPROFILE' |
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
93 let $HOMEDRIVE = 'unused' |
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
94 let $HOMEPATH = 'unused' |
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
95 call CheckHome('%USERPROFILE', '%USERPROFILE') |
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
96 |
12275
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
97 " %USERPROFILE% not at start of $HOME is not expanded |
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
98 let $USERPROFILE = 'unused' |
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
99 let $HOME = 'C:\%USERPROFILE%' |
12275
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
100 let $HOMEDRIVE = 'unused' |
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
101 let $HOMEPATH = 'unused' |
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
102 call CheckHome('C:\%USERPROFILE%', 'C:\%USERPROFILE%') |
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
103 |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
104 if has('channel') |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
105 RestoreEnv |
12275
67bc88591ede
patch 8.0.1017: test for MS-Windows $HOME always passes
Christian Brabandt <cb@256bit.org>
parents:
12265
diff
changeset
|
106 let $HOME = save_home |
12265
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
107 let env = '' |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
108 let job = job_start('cmd /c set', {'out_cb': {ch,x->[env,execute('let env=x')]}}) |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
109 sleep 1 |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
110 let env = filter(split(env, "\n"), 'v:val=="HOME"') |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
111 let home = len(env) == 0 ? "" : env[0] |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
112 call assert_equal('', home) |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
113 endif |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
114 finally |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
115 RestoreEnv |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
116 delcommand SaveEnv |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
117 delcommand RestoreEnv |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
118 delcommand UnletEnv |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
119 endtry |
03e4be2e3d53
patch 8.0.1012: MS-Windows: problem with $HOME when is was set internally
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
120 endfunc |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
17663
diff
changeset
|
121 |
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
17663
diff
changeset
|
122 " vim: shiftwidth=2 sts=2 expandtab |