@@ -33,10 +33,10 @@ def registered_key_bindings(keys)
33
33
34
34
def test_read_lines
35
35
@config . read_lines ( <<~LINES . lines )
36
- set bell-style on
36
+ set show-mode-in-prompt on
37
37
LINES
38
38
39
- assert_equal :audible , @config . instance_variable_get ( :@bell_style )
39
+ assert_equal true , @config . instance_variable_get ( :@show_mode_in_prompt )
40
40
end
41
41
42
42
def test_read_lines_with_variable
@@ -160,69 +160,69 @@ def test_bind_key_with_hexadecimal_number
160
160
def test_include
161
161
File . open ( 'included_partial' , 'wt' ) do |f |
162
162
f . write ( <<~PARTIAL_LINES )
163
- set bell-style on
163
+ set show-mode-in-prompt on
164
164
PARTIAL_LINES
165
165
end
166
166
@config . read_lines ( <<~LINES . lines )
167
167
$include included_partial
168
168
LINES
169
169
170
- assert_equal :audible , @config . instance_variable_get ( :@bell_style )
170
+ assert_equal true , @config . instance_variable_get ( :@show_mode_in_prompt )
171
171
end
172
172
173
173
def test_include_expand_path
174
174
home_backup = ENV [ 'HOME' ]
175
175
File . open ( 'included_partial' , 'wt' ) do |f |
176
176
f . write ( <<~PARTIAL_LINES )
177
- set bell-style on
177
+ set show-mode-in-prompt on
178
178
PARTIAL_LINES
179
179
end
180
180
ENV [ 'HOME' ] = Dir . pwd
181
181
@config . read_lines ( <<~LINES . lines )
182
182
$include ~/included_partial
183
183
LINES
184
184
185
- assert_equal :audible , @config . instance_variable_get ( :@bell_style )
185
+ assert_equal true , @config . instance_variable_get ( :@show_mode_in_prompt )
186
186
ensure
187
187
ENV [ 'HOME' ] = home_backup
188
188
end
189
189
190
190
def test_if
191
191
@config . read_lines ( <<~LINES . lines )
192
192
$if Ruby
193
- set bell-style audible
193
+ set vi-cmd-mode-string (cmd)
194
194
$else
195
- set bell-style visible
195
+ set vi-cmd-mode-string [cmd]
196
196
$endif
197
197
LINES
198
198
199
- assert_equal :audible , @config . instance_variable_get ( :@bell_style )
199
+ assert_equal '(cmd)' , @config . instance_variable_get ( :@vi_cmd_mode_string )
200
200
end
201
201
202
202
def test_if_with_false
203
203
@config . read_lines ( <<~LINES . lines )
204
204
$if Python
205
- set bell-style audible
205
+ set vi-cmd-mode-string (cmd)
206
206
$else
207
- set bell-style visible
207
+ set vi-cmd-mode-string [cmd]
208
208
$endif
209
209
LINES
210
210
211
- assert_equal :visible , @config . instance_variable_get ( :@bell_style )
211
+ assert_equal '[cmd]' , @config . instance_variable_get ( :@vi_cmd_mode_string )
212
212
end
213
213
214
214
def test_if_with_indent
215
215
%w[ Ruby Reline ] . each do |cond |
216
216
@config . read_lines ( <<~LINES . lines )
217
- set bell-style none
217
+ set vi-cmd-mode-string {cmd}
218
218
$if #{ cond }
219
- set bell-style audible
219
+ set vi-cmd-mode-string (cmd)
220
220
$else
221
- set bell-style visible
221
+ set vi-cmd-mode-string [cmd]
222
222
$endif
223
223
LINES
224
224
225
- assert_equal :audible , @config . instance_variable_get ( :@bell_style )
225
+ assert_equal '(cmd)' , @config . instance_variable_get ( :@vi_cmd_mode_string )
226
226
end
227
227
end
228
228
0 commit comments