comparison src/testdir/test_flatten.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 821925509d8c
children 525c9e218c69
comparison
equal deleted inserted replaced
21764:476b6faad407 21765:08940efa6b4e
1 " Test for flatting list. 1 " Test for flatting list.
2
2 func Test_flatten() 3 func Test_flatten()
3 call assert_fails('call flatten(1)', 'E686:') 4 call assert_fails('call flatten(1)', 'E686:')
4 call assert_fails('call flatten({})', 'E686:') 5 call assert_fails('call flatten({})', 'E686:')
5 call assert_fails('call flatten("string")', 'E686:') 6 call assert_fails('call flatten("string")', 'E686:')
6 call assert_fails('call flatten([], [])', 'E745:') 7 call assert_fails('call flatten([], [])', 'E745:')
77 call add(x, y) " l:x = [1, [2]] 78 call add(x, y) " l:x = [1, [2]]
78 call add(y, x) " l:y = [2, [1, [...]]] 79 call add(y, x) " l:y = [2, [1, [...]]]
79 call assert_equal([1, 2, 1, 2], flatten(l:x, 2)) 80 call assert_equal([1, 2, 1, 2], flatten(l:x, 2))
80 call assert_equal([2, l:x], l:y) 81 call assert_equal([2, l:x], l:y)
81 endfunc 82 endfunc
83
84 " vim: shiftwidth=2 sts=2 expandtab