diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-05-24 16:59:14 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-24 16:59:14 -0400 |
| commit | a282a177d3320db25fa8f854cbcdbe0bc6abde7f (patch) | |
| tree | 137f0f1babdd1fc776f4b63a275604f7c526841d /src/nvim/testdir/test_sort.vim | |
| parent | 0a653f7ab98dfc05bf0532b9f81bc19377031900 (diff) | |
| parent | 370e65ed7cb299b49306e96f13cf6b5c7f717a6c (diff) | |
| download | rneovim-a282a177d3320db25fa8f854cbcdbe0bc6abde7f.tar.gz rneovim-a282a177d3320db25fa8f854cbcdbe0bc6abde7f.tar.bz2 rneovim-a282a177d3320db25fa8f854cbcdbe0bc6abde7f.zip | |
Merge pull request #14634 from janlazo/vim-8.2.2880
vim-patch:8.2.{511,1689,1957,2880,2884}
Diffstat (limited to 'src/nvim/testdir/test_sort.vim')
| -rw-r--r-- | src/nvim/testdir/test_sort.vim | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/src/nvim/testdir/test_sort.vim b/src/nvim/testdir/test_sort.vim index 6d55889641..570c4415c6 100644 --- a/src/nvim/testdir/test_sort.vim +++ b/src/nvim/testdir/test_sort.vim @@ -1,5 +1,7 @@ " Tests for the "sort()" function and for the ":sort" command. +source check.vim + func Compare1(a, b) abort call sort(range(3), 'Compare2') return a:a - a:b @@ -59,6 +61,7 @@ func Test_sort_numbers() endfunc func Test_sort_float() + CheckFeature float call assert_equal([0.28, 3, 13.5], sort([13.5, 0.28, 3], 'f')) endfunc @@ -68,6 +71,8 @@ func Test_sort_nested() endfunc func Test_sort_default() + CheckFeature float + " docs say omitted, empty or zero argument sorts on string representation. call assert_equal(['2', 'A', 'AA', 'a', 1, 3.3], sort([3.3, 1, "2", "A", "a", "AA"])) call assert_equal(['2', 'A', 'AA', 'a', 1, 3.3], sort([3.3, 1, "2", "A", "a", "AA"], '')) @@ -1176,30 +1181,6 @@ func Test_sort_cmd() \ ] \ }, \ { - \ 'name' : 'float', - \ 'cmd' : 'sort f', - \ 'input' : [ - \ '1.234', - \ '0.88', - \ ' + 123.456', - \ '1.15e-6', - \ '-1.1e3', - \ '-1.01e3', - \ '', - \ '' - \ ], - \ 'expected' : [ - \ '', - \ '', - \ '-1.1e3', - \ '-1.01e3', - \ '1.15e-6', - \ '0.88', - \ '1.234', - \ ' + 123.456' - \ ] - \ }, - \ { \ 'name' : 'alphabetical, sorted input', \ 'cmd' : 'sort', \ 'input' : [ |