vim-patch:8.2.1040: not enough testing for movement commands

Problem:    Not enough testing for movement commands.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#6313)
bdd2c290d3

Cherry-pick test_functions.vim changes from patch 8.2.0183.
Cherry-pick Test_normal18_z_fold() change from patch 8.2.0540.
This commit is contained in:
zeertzjq
2022-07-17 09:10:25 +08:00
parent e53330a603
commit 7c3a87182d
6 changed files with 253 additions and 55 deletions

View File

@@ -185,7 +185,9 @@ func Test_str2nr()
call assert_fails('call str2nr([])', 'E730:')
call assert_fails('call str2nr({->2})', 'E729:')
call assert_fails('call str2nr(1.2)', 'E806:')
if has('float')
call assert_fails('call str2nr(1.2)', 'E806:')
endif
call assert_fails('call str2nr(10, [])', 'E474:')
endfunc
@@ -325,11 +327,18 @@ func Test_simplify()
call assert_equal('./file', simplify('./dir/../file'))
call assert_equal('../dir/file', simplify('dir/../../dir/file'))
call assert_equal('./file', simplify('dir/.././file'))
call assert_equal('../dir', simplify('./../dir'))
call assert_equal('..', simplify('../testdir/..'))
call mkdir('Xdir')
call assert_equal('.', simplify('Xdir/../.'))
call delete('Xdir', 'd')
call assert_fails('call simplify({->0})', 'E729:')
call assert_fails('call simplify([])', 'E730:')
call assert_fails('call simplify({})', 'E731:')
call assert_fails('call simplify(1.2)', 'E806:')
if has('float')
call assert_fails('call simplify(1.2)', 'E806:')
endif
endfunc
func Test_pathshorten()