diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-03-09 22:06:49 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-03-09 22:06:49 +0000 |
commit | be19d78c3d44221cbc38fbb5bac19302345c1def (patch) | |
tree | 1a1e07ad5501f660705c69190d76526e1acae4e6 /src/testdir | |
parent | 638388b8ef37684e36a7f5d9286bab2d31c28f36 (diff) |
patch 9.0.1396: sort(list, 'N') does not work in Vim9 script contextv9.0.1396
Problem: sort(list, 'N') does not work in Vim9 script context.
Solution: Convert string to number without giving an error. (closes #12061)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_sort.vim | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/testdir/test_sort.vim b/src/testdir/test_sort.vim index a2731a8004..14a70cf934 100644 --- a/src/testdir/test_sort.vim +++ b/src/testdir/test_sort.vim @@ -58,6 +58,7 @@ endfunc func Test_sort_numbers() call assert_equal([3, 13, 28], sort([13, 28, 3], 'N')) call assert_equal(['3', '13', '28'], sort(['13', '28', '3'], 'N')) + vim9cmd call assert_equal(['3', '13', '28'], sort(['13', '28', '3'], 'N')) call assert_equal([3997, 4996], sort([4996, 3997], 'Compare1')) endfunc |