Mercurial > vim
view src/testdir/test_sort.vim @ 8049:15253130abd8 v7.4.1319
commit https://github.com/vim/vim/commit/16eb4f88000cfdba68df6c421fe44e7e029ba53e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Feb 14 23:02:34 2016 +0100
patch 7.4.1319
Problem: Tests fail on MS-Windows and on Unix with GUI.
Solution: Fix unregistering.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 14 Feb 2016 23:15:04 +0100 |
parents | 20dc2763a3b9 |
children | c16aa03d8db5 |
line wrap: on
line source
" Test sort() func Test_sort_strings() " numbers compared as strings call assert_equal([1, 2, 3], sort([3, 2, 1])) call assert_equal([13, 28, 3], sort([3, 28, 13])) endfunc func Test_sort_numeric() call assert_equal([1, 2, 3], sort([3, 2, 1], 'n')) call assert_equal([3, 13, 28], sort([13, 28, 3], 'n')) " strings are not sorted call assert_equal(['13', '28', '3'], sort(['13', '28', '3'], 'n')) 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')) endfunc func Test_sort_float() call assert_equal([0.28, 3, 13.5], sort([13.5, 0.28, 3], 'f')) endfunc