@@ -17,7 +17,7 @@ func Test_comment_nested()
17
17
>>>> H
18
18
END
19
19
call assert_equal (expected, getline (1 , ' $' ))
20
- close !
20
+ bw !
21
21
endfunc
22
22
23
23
" Test for the 'b' flag in 'comments'
@@ -36,7 +36,7 @@ func Test_comment_blank()
36
36
H
37
37
END
38
38
call assert_equal (expected, getline (1 , ' $' ))
39
- close !
39
+ bw !
40
40
endfunc
41
41
42
42
" Test for the 'f' flag in 'comments' (only the first line has a comment
@@ -50,7 +50,7 @@ func Test_comment_firstline()
50
50
setlocal comments = :-
51
51
exe " normal i- B\n D\<C-C> ggoC\<C-C> ggOA\<C-C> "
52
52
call assert_equal ([' - A' , ' - B' , ' - C' , ' - D' ], getline (1 , ' $' ))
53
- close !
53
+ bw !
54
54
endfunc
55
55
56
56
" Test for the 's', 'm' and 'e' flags in 'comments'
@@ -75,7 +75,7 @@ func Test_comment_threepiece()
75
75
setlocal autoindent noexpandtab
76
76
call feedkeys (" a\t /*\t one\n two\n /" , ' xt' )
77
77
call assert_equal ([" \t /*\t one" , " \t *\t two" , " \t */" ], getline (1 , ' $' ))
78
- close !
78
+ bw !
79
79
endfunc
80
80
81
81
" Test for the 'r' flag in 'comments' (right align comment)
@@ -97,7 +97,7 @@ func Test_comment_rightalign()
97
97
G
98
98
END
99
99
call assert_equal (expected, getline (1 , ' $' ))
100
- close !
100
+ bw !
101
101
endfunc
102
102
103
103
" Test for the 'O' flag in 'comments'
@@ -112,7 +112,7 @@ func Test_comment_O()
112
112
* D
113
113
END
114
114
call assert_equal (expected, getline (1 , ' $' ))
115
- close !
115
+ bw !
116
116
endfunc
117
117
118
118
" Test for using a multibyte character as a comment leader
@@ -185,7 +185,7 @@ func Test_comment_multibyte_leader()
185
185
call assert_equal (expected, getline (1 , ' $' ))
186
186
187
187
set tw & fo & comments &
188
- close !
188
+ bw !
189
189
endfunc
190
190
191
191
" Test for a space character in 'comments' setting
@@ -205,7 +205,7 @@ func Test_comment_space()
205
205
> H
206
206
END
207
207
call assert_equal (expected, getline (1 , ' $' ))
208
- close !
208
+ bw !
209
209
endfunc
210
210
211
211
" Test for formatting lines with and without comments
@@ -214,7 +214,7 @@ func Test_comment_format_lines()
214
214
call setline (1 , [' one' , ' /* two */' , ' three' ])
215
215
normal gggqG
216
216
call assert_equal ([' one' , ' /* two */' , ' three' ], getline (1 , ' $' ))
217
- close !
217
+ bw !
218
218
endfunc
219
219
220
220
" Test for using 'a' in 'formatoptions' with comments
@@ -243,7 +243,7 @@ func Test_comment_autoformat()
243
243
call assert_equal ([' one' ], getline (1 , ' $' ))
244
244
set backspace &
245
245
246
- close !
246
+ bw !
247
247
endfunc
248
248
249
249
" Test for joining lines with comments ('j' flag in 'formatoptions')
@@ -262,7 +262,7 @@ func Test_comment_join_lines_fo_j()
262
262
call setline (1 , [' i++; > ) > ) comment1' , ' > ) comment2' ])
263
263
normal J
264
264
call assert_equal (' i++; > ) > ) comment1 comment2' , getline (1 ))
265
- close !
265
+ bw !
266
266
endfunc
267
267
268
268
" Test for formatting lines where only the first line has a comment.
@@ -277,7 +277,7 @@ func Test_comment_format_firstline_comment()
277
277
call setline (1 , [' - one' , ' - two' ])
278
278
normal gggqG
279
279
call assert_equal ([' - one' , ' - two' ], getline (1 , ' $' ))
280
- close !
280
+ bw !
281
281
endfunc
282
282
283
283
" vim: shiftwidth = 2 sts = 2 expandtab
0 commit comments