diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-08-17 16:39:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-17 16:39:08 +0800 |
commit | fb78c1983c267f622c1983a999f5fb8bdfc85c73 (patch) | |
tree | 40326a4d586d1acbc4251fcbf35f9a8efc596318 /test | |
parent | 200dafb8a5839826bc157bdc9153f1171ce639e1 (diff) | |
parent | 6267996f13c5fd2ae8023b85c48e0e207e278cd9 (diff) | |
download | rneovim-fb78c1983c267f622c1983a999f5fb8bdfc85c73.tar.gz rneovim-fb78c1983c267f622c1983a999f5fb8bdfc85c73.tar.bz2 rneovim-fb78c1983c267f622c1983a999f5fb8bdfc85c73.zip |
Merge pull request #24750 from zeertzjq/vim-8.2.4450
vim-patch:8.2.{4450,4451,4455}
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_listdict.vim | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/old/testdir/test_listdict.vim b/test/old/testdir/test_listdict.vim index 593fd12c1e..f2b4747ff2 100644 --- a/test/old/testdir/test_listdict.vim +++ b/test/old/testdir/test_listdict.vim @@ -887,7 +887,7 @@ func Test_reverse_sort_uniq() call assert_equal([-1, 'one', 'two', 'three', 'four', 1.0e-15, 0.22, 7, 9, 12, 18, 22, 255], sort(copy(l), 'n')) LET l = [7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0, -0, 0.22, 'bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', {}, []] - call assert_equal(['bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}], sort(copy(l), 1)) + call assert_equal(['bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}], sort(copy(l), 'i')) call assert_equal(['bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}], sort(copy(l), 'i')) call assert_equal(['BAR', 'Bar', 'FOO', 'FOOBAR', 'Foo', 'bar', 'foo', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}], sort(copy(l))) endif @@ -899,6 +899,16 @@ func Test_reverse_sort_uniq() call assert_fails("call sort([1, 2], function('min'), 1)", "E1206:") call assert_fails("call sort([1, 2], function('invalid_func'))", "E700:") call assert_fails("call sort([1, 2], function('min'))", "E118:") + + let lines =<< trim END + call sort(['a', 'b'], 0) + END + call CheckDefAndScriptFailure(lines, 'E1256: String or function required for argument 2') + + let lines =<< trim END + call sort(['a', 'b'], 1) + END + call CheckDefAndScriptFailure(lines, 'E1256: String or function required for argument 2') endfunc " reduce a list, blob or string |