@@ -143,7 +143,6 @@ Describe System.Filepath
143
143
End
144
144
It include .. in path no-expand, but head ~ home expanded.
145
145
if s:is_windows
146
- " base shellslash not set need
147
146
let target = '~\Hoge\..\Fuga'
148
147
else
149
148
let target = '~/Hoge/../Fuga'
@@ -154,6 +153,32 @@ Describe System.Filepath
154
153
End
155
154
if s:is_windows
156
155
" need completeslash test
156
+ if exists('&completeslash')
157
+ It [windows] completeslash not set home expand test
158
+ let backup_completeslash = &completeslash
159
+ set completeslash&
160
+ let path = '~/Hoge'
161
+ let ret = FP.expand_home(path)
162
+ Assert Equals(ret, $HOME . FP.separator() . 'Hoge')
163
+ let &completeslash = backup_completeslash
164
+ End
165
+ It [windows] completeslash=slash home expand test
166
+ let backup_completeslash = &completeslash
167
+ set completeslash=slash
168
+ let path = '~/Hoge'
169
+ let ret = FP.expand_home(path)
170
+ Assert Equals(ret, $HOME . FP.separator() . 'Hoge')
171
+ let &completeslash = backup_completeslash
172
+ End
173
+ It [windows] completeslash=backslash home expand test
174
+ let backup_completeslash = &completeslash
175
+ set completeslash=backslash
176
+ let path = '~/Hoge'
177
+ let ret = FP.expand_home(path)
178
+ Assert Equals(ret, $HOME . FP.separator() . 'Hoge')
179
+ let &completeslash = backup_completeslash
180
+ End
181
+ endif
157
182
else
158
183
" need ~user test
159
184
It [unix] ~user expand check
0 commit comments