diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-07-17 11:30:32 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-17 11:30:32 +0800 |
| commit | 53c398d8f44f1796c216402c953512eb57733529 (patch) | |
| tree | a4abcbed4256058b40e4dc1badd2f06c22079abf /src/nvim/testdir/test_functions.vim | |
| parent | 9f837a5dcf61e0b27778dd7127036e12d694d92c (diff) | |
| parent | 7c3a87182d471649126c58d999d46abede6f60cd (diff) | |
| download | rneovim-53c398d8f44f1796c216402c953512eb57733529.tar.gz rneovim-53c398d8f44f1796c216402c953512eb57733529.tar.bz2 rneovim-53c398d8f44f1796c216402c953512eb57733529.zip | |
Merge pull request #19402 from zeertzjq/vim-8.2.0655
vim-patch:8.2.{0655,1040}: not enough tests
Diffstat (limited to 'src/nvim/testdir/test_functions.vim')
| -rw-r--r-- | src/nvim/testdir/test_functions.vim | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index 3feb4d5f7f..9b8d740efb 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -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() |