Mercurial > vim
view src/testdir/test_sort.vim @ 7734:616769d423fc v7.4.1165
commit https://github.com/vim/vim/commit/938ee834d345062cd94f8fdfd54fad0019432a83
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 24 15:36:03 2016 +0100
patch 7.4.1165
Problem: When defining DYNAMIC_ICONV_DLL in the makefile, the build fails.
Solution: Add #ifdef's. (Taro Muraoka) Try the newer version first.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 24 Jan 2016 15:45: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