Mercurial > vim
comparison src/testdir/test_join.vim @ 12662:15f0f9f16cd9 v8.0.1209
patch 8.0.1209: still too many old style tests
commit https://github.com/vim/vim/commit/53f0c962394dc6bc66d5b0762af9434e672d1b25
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 22 14:23:59 2017 +0200
patch 8.0.1209: still too many old style tests
Problem: Still too many old style tests.
Solution: Convert a few more tests to new style. (Yegappan Lakshmanan,
closes #2230)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 22 Oct 2017 14:30:07 +0200 |
parents | dd2e2bd69d0e |
children | f776ce5d4ed8 |
comparison
equal
deleted
inserted
replaced
12661:9ee086df7d78 | 12662:15f0f9f16cd9 |
---|---|
9 call setline(1, ['one', 'two', 'three', 'four']) | 9 call setline(1, ['one', 'two', 'three', 'four']) |
10 normal 10J | 10 normal 10J |
11 call assert_equal('one two three four', getline(1)) | 11 call assert_equal('one two three four', getline(1)) |
12 quit! | 12 quit! |
13 endfunc | 13 endfunc |
14 | |
15 " Tests for setting the '[,'] marks when joining lines. | |
16 func Test_join_marks() | |
17 enew | |
18 call append(0, [ | |
19 \ "\t\tO sodales, ludite, vos qui", | |
20 \ "attamen consulite per voster honur. Tua pulchra " . | |
21 \ "facies me fay planszer milies", | |
22 \ "", | |
23 \ "This line.", | |
24 \ "Should be joined with the next line", | |
25 \ "and with this line"]) | |
26 | |
27 normal gg0gqj | |
28 call assert_equal([0, 1, 1, 0], getpos("'[")) | |
29 call assert_equal([0, 2, 1, 0], getpos("']")) | |
30 | |
31 /^This line/;'}-join | |
32 call assert_equal([0, 4, 11, 0], getpos("'[")) | |
33 call assert_equal([0, 4, 67, 0], getpos("']")) | |
34 enew! | |
35 endfunc |