Skip to content

Commit ff83982

Browse files
committed
add tests with hard tabs
1 parent 2600c22 commit ff83982

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

t/clang_format_spec.vim

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,31 @@ describe ':ClangFormat'
313313
end
314314

315315
end
316+
317+
describe 'hard tab'
318+
319+
before
320+
let g:clang_format#detect_style_file = 0
321+
let s:saved_expandtab = &expandtab
322+
let s:saved_shiftwidth = &shiftwidth
323+
set noexpandtab shiftwidth=8
324+
new
325+
execute 'silent' 'edit!' './'.s:root_dir.'t/test.cpp'
326+
end
327+
328+
after
329+
let &expandtab = s:saved_expandtab
330+
let &shiftwidth = s:saved_shiftwidth
331+
end
332+
333+
it 'does not break formatting'
334+
let by_clang_format_command = ClangFormat(1, line('$'), 'test.cpp')
335+
ClangFormat
336+
let buffer = GetBuffer()
337+
Expect by_clang_format_command ==# buffer
338+
end
339+
340+
end
316341
end
317342
" }}}
318343

0 commit comments

Comments
 (0)