From 1b0937dd894d4ea5d1c66f8037b4e1c4e2b888bd Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 24 May 2021 14:43:47 -0400 Subject: test/old: partial port of patch v8.2.1.0183 Prep for patch v8.2.0511. --- src/nvim/testdir/test_sort.vim | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) (limited to 'src/nvim/testdir/test_sort.vim') 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' : [ -- cgit