File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -152,5 +152,31 @@ def test_incomplete_encoding_magic_comment
152
152
assert_indenting ( lines , row . new_line_spaces , true )
153
153
end
154
154
end
155
+
156
+ def test_incomplete_emacs_coding_magic_comment
157
+ input_with_correct_indents = [
158
+ Row . new ( %q(# -*- coding: u) , nil , 0 ) ,
159
+ ]
160
+
161
+ lines = [ ]
162
+ input_with_correct_indents . each do |row |
163
+ lines << row . content
164
+ assert_indenting ( lines , row . current_line_spaces , false )
165
+ assert_indenting ( lines , row . new_line_spaces , true )
166
+ end
167
+ end
168
+
169
+ def test_incomplete_vim_coding_magic_comment
170
+ input_with_correct_indents = [
171
+ Row . new ( %q(# vim:set fileencoding=u) , nil , 0 ) ,
172
+ ]
173
+
174
+ lines = [ ]
175
+ input_with_correct_indents . each do |row |
176
+ lines << row . content
177
+ assert_indenting ( lines , row . current_line_spaces , false )
178
+ assert_indenting ( lines , row . new_line_spaces , true )
179
+ end
180
+ end
155
181
end
156
182
end
You can’t perform that action at this time.
0 commit comments