From a4e711dae73a0581ebdf337e127bf534045626e6 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 14 Sep 2014 14:01:42 +0400 Subject: [PATCH] Add tests for invalid unicode filenames Ref #1071 --- tests/test_invalid_unicode.vim | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/test_invalid_unicode.vim diff --git a/tests/test_invalid_unicode.vim b/tests/test_invalid_unicode.vim new file mode 100644 index 00000000..d09e2bb2 --- /dev/null +++ b/tests/test_invalid_unicode.vim @@ -0,0 +1,19 @@ +set encoding=utf-8 +let g:powerline_config_paths = [expand(':p:h:h') . '/powerline/config_files'] +set laststatus=2 +set showtabline=2 +edit `="\xFF"` +redir => g:messages + try + source powerline/bindings/vim/plugin/powerline.vim + redrawstatus! + catch + call writefile(['Unexpected exception', v:exception], 'message.fail') + cquit + endtry +redir END +if g:messages =~# '\v\S' + call writefile(['Unexpected messages'] + split(g:messages, "\n", 1), 'message.fail') + cquit +endif +qall!