Mercurial > vim
view src/testdir/test_sort.vim @ 7452:b3eb1dfbc1fa v7.4.1029
commit https://github.com/vim/vim/commit/d3343960d7745bd586197a28b9a96d634a292422
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 2 18:17:16 2016 +0100
patch 7.4.1029
Problem: test_increment fails on systems with 32 bit long.
Solution: Only test with 32 bits.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 02 Jan 2016 18:30:04 +0100 |
parents | 6ffc75d807bd |
children | 20dc2763a3b9 |
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