comparison src/testdir/test_sort.vim @ 21765:08940efa6b4e v8.2.1432

patch 8.2.1432: various inconsistencies in test files Commit: https://github.com/vim/vim/commit/6d91bcb4d23b5c6a0be72c384beaf385e2d9d606 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 12 18:50:36 2020 +0200 patch 8.2.1432: various inconsistencies in test files Problem: Various inconsistencies in test files. Solution: Add modelines where they were missing. Use Check commands instead of silently skipping over tests. Adjust indents and comments. (Ken Takata, closes #6695)
author Bram Moolenaar <Bram@vim.org>
date Wed, 12 Aug 2020 19:00:08 +0200
parents 2c23053c654a
children 595ea7f099cd
comparison
equal deleted inserted replaced
21764:476b6faad407 21765:08940efa6b4e
1 " Tests for the "sort()" function and for the ":sort" command. 1 " Tests for the "sort()" function and for the ":sort" command.
2 2
3 source check.vim 3 source check.vim
4 4
5 func Compare1(a, b) abort 5 func Compare1(a, b) abort
6 call sort(range(3), 'Compare2') 6 call sort(range(3), 'Compare2')
7 return a:a - a:b 7 return a:a - a:b
8 endfunc 8 endfunc
9 9
10 func Compare2(a, b) abort 10 func Compare2(a, b) abort
11 return a:a - a:b 11 return a:a - a:b
12 endfunc 12 endfunc
13 13
14 func Test_sort_strings() 14 func Test_sort_strings()
15 " numbers compared as strings 15 " numbers compared as strings
16 call assert_equal([1, 2, 3], sort([3, 2, 1])) 16 call assert_equal([1, 2, 3], sort([3, 2, 1]))