comparison src/testdir/test_plus_arg_edit.vim @ 30051:13b02c1ea0f7 v9.0.0363

patch 9.0.0363: common names in test files causes tests to be flaky Commit: https://github.com/vim/vim/commit/b18b49699776485150b71626069a40d12d2c5590 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 2 21:55:50 2022 +0100 patch 9.0.0363: common names in test files causes tests to be flaky Problem: Common names in test files causes tests to be flaky. Solution: Use more specific names.
author Bram Moolenaar <Bram@vim.org>
date Fri, 02 Sep 2022 23:00:04 +0200
parents 08940efa6b4e
children 457ea0570b6f
comparison
equal deleted inserted replaced
30050:4d0a9c80a90c 30051:13b02c1ea0f7
10 call delete('Xfile2') 10 call delete('Xfile2')
11 endfunction 11 endfunction
12 12
13 func Test_edit_bad() 13 func Test_edit_bad()
14 " Test loading a utf8 file with bad utf8 sequences. 14 " Test loading a utf8 file with bad utf8 sequences.
15 call writefile(["[\xff][\xc0][\xe2\x89\xf0][\xc2\xc2]"], "Xfile") 15 call writefile(["[\xff][\xc0][\xe2\x89\xf0][\xc2\xc2]"], "Xbadfile")
16 new 16 new
17 17
18 " Without ++bad=..., the default behavior is like ++bad=? 18 " Without ++bad=..., the default behavior is like ++bad=?
19 e! ++enc=utf8 Xfile 19 e! ++enc=utf8 Xbadfile
20 call assert_equal('[?][?][???][??]', getline(1)) 20 call assert_equal('[?][?][???][??]', getline(1))
21 21
22 e! ++encoding=utf8 ++bad=_ Xfile 22 e! ++encoding=utf8 ++bad=_ Xbadfile
23 call assert_equal('[_][_][___][__]', getline(1)) 23 call assert_equal('[_][_][___][__]', getline(1))
24 24
25 e! ++enc=utf8 ++bad=drop Xfile 25 e! ++enc=utf8 ++bad=drop Xbadfile
26 call assert_equal('[][][][]', getline(1)) 26 call assert_equal('[][][][]', getline(1))
27 27
28 e! ++enc=utf8 ++bad=keep Xfile 28 e! ++enc=utf8 ++bad=keep Xbadfile
29 call assert_equal("[\xff][\xc0][\xe2\x89\xf0][\xc2\xc2]", getline(1)) 29 call assert_equal("[\xff][\xc0][\xe2\x89\xf0][\xc2\xc2]", getline(1))
30 30
31 call assert_fails('e! ++enc=utf8 ++bad=foo Xfile', 'E474:') 31 call assert_fails('e! ++enc=utf8 ++bad=foo Xbadfile', 'E474:')
32 32
33 bw! 33 bw!
34 call delete('Xfile') 34 call delete('Xbadfile')
35 endfunc 35 endfunc
36 36
37 " Test for ++bin and ++nobin arguments 37 " Test for ++bin and ++nobin arguments
38 func Test_binary_arg() 38 func Test_binary_arg()
39 new 39 new