Skip to content

Commit f3f0943

Browse files
committed
System.Filepath: windows expand_home test data based on backslash
1 parent 8762e9e commit f3f0943

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

test/System/Filepath.vimspec

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,11 @@ Describe System.Filepath
137137
End
138138
endif
139139
It expand head ~ home path
140-
let path = '~/Hoge'
140+
if s:is_windows
141+
let path = '~\Hoge'
142+
else
143+
let path = '~/Hoge'
144+
endif
141145
let ret = FP.expand_home(path)
142146
Assert Equals(ret, $HOME . FP.separator() . 'Hoge')
143147
End
@@ -157,23 +161,23 @@ Describe System.Filepath
157161
It [windows] completeslash not set home expand test
158162
let backup_completeslash = &completeslash
159163
set completeslash&
160-
let path = '~/Hoge'
164+
let path = '~\Hoge'
161165
let ret = FP.expand_home(path)
162166
Assert Equals(ret, $HOME . FP.separator() . 'Hoge')
163167
let &completeslash = backup_completeslash
164168
End
165169
It [windows] completeslash=slash home expand test
166170
let backup_completeslash = &completeslash
167171
set completeslash=slash
168-
let path = '~/Hoge'
172+
let path = '~\Hoge'
169173
let ret = FP.expand_home(path)
170174
Assert Equals(ret, $HOME . FP.separator() . 'Hoge')
171175
let &completeslash = backup_completeslash
172176
End
173177
It [windows] completeslash=backslash home expand test
174178
let backup_completeslash = &completeslash
175179
set completeslash=backslash
176-
let path = '~/Hoge'
180+
let path = '~\Hoge'
177181
let ret = FP.expand_home(path)
178182
Assert Equals(ret, $HOME . FP.separator() . 'Hoge')
179183
let &completeslash = backup_completeslash

0 commit comments

Comments
 (0)