Skip to content

Commit 2afeb40

Browse files
committed
patch 8.2.4450: list sort test fails
Problem: List sort test fails. Solution: Pass a valid "how" argument.
1 parent e843efc commit 2afeb40

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/testdir/test_listdict.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,9 @@ endfunc
934934

935935
" Tests for reverse(), sort(), uniq()
936936
func Test_reverse_sort_uniq()
937+
func g:RetOne()
938+
return 1
939+
endfunc
937940
let lines =<< trim END
938941
VAR l = ['-0', 'A11', 2, 2, 'xaaa', 4, 'foo', 'foo6', 'foo', [0, 1, 2], 'x8', [0, 1, 2], 1.5]
939942
call assert_equal(['-0', 'A11', 2, 'xaaa', 4, 'foo', 'foo6', 'foo', [0, 1, 2], 'x8', [0, 1, 2], 1.5], uniq(copy(l)))
@@ -949,12 +952,13 @@ func Test_reverse_sort_uniq()
949952
call assert_equal([-1, 'one', 'two', 'three', 'four', 1.0e-15, 0.22, 7, 9, 12, 18, 22, 255], sort(copy(l), 'n'))
950953

951954
LET l = [7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0, -0, 0.22, 'bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', {}, []]
952-
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))
955+
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), g:RetOne()))
953956
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'))
954957
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)))
955958
endif
956959
END
957960
call v9.CheckLegacyAndVim9Success(lines)
961+
delfunc g:RetOne
958962

959963
call assert_fails('call reverse("")', 'E899:')
960964
call assert_fails('call uniq([1, 2], {x, y -> []})', 'E745:')

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
4450,
753755
/**/
754756
4449,
755757
/**/

0 commit comments

Comments
 (0)