comparison src/testdir/test_shortpathname.vim @ 18479:cbea1392c393 v8.1.2234

patch 8.1.2234: get_short_pathname() fails depending on encoding Commit: https://github.com/vim/vim/commit/3f39697b73f661d6900c7cf5430d967a129660d7 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Oct 30 04:10:06 2019 +0100 patch 8.1.2234: get_short_pathname() fails depending on encoding Problem: get_short_pathname() fails depending on encoding. Solution: Use the wide version of the library function. (closes https://github.com/vim/vim/issues/5129)
author Bram Moolenaar <Bram@vim.org>
date Wed, 30 Oct 2019 04:15:04 +0100
parents 403ac78df9a0
children 26a04a556982
comparison
equal deleted inserted replaced
18478:94223687df0e 18479:cbea1392c393
1 " Test for shortpathname ':8' extension. 1 " Test for shortpathname ':8' extension.
2 " Only for use on Win32 systems! 2 " Only for use on Win32 systems!
3
4 set encoding=utf-8
5 scriptencoding utf-8
3 6
4 source check.vim 7 source check.vim
5 CheckMSWindows 8 CheckMSWindows
6 9
7 func TestIt(file, bits, expected) 10 func TestIt(file, bits, expected)
65 call delete(dir2, 'd') 68 call delete(dir2, 'd')
66 call delete(dir1, 'd') 69 call delete(dir1, 'd')
67 70
68 exe "cd " . save_dir 71 exe "cd " . save_dir
69 endfunc 72 endfunc
73
74 func Test_ColonEight_MultiByte()
75 let dir = 'Xtest'
76
77 let file = dir . '/日本語のファイル.txt'
78
79 call mkdir(dir)
80 call writefile([], file)
81
82 let sfile = fnamemodify(file, ':8')
83
84 call assert_notequal(file, sfile)
85 call assert_match('\~', sfile)
86
87 call delete(file)
88 call delete(dir, 'd')
89 endfunc