diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-07-28 16:46:57 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-07-28 16:46:57 +0200 |
commit | 9966b21a57277986217aa28237d6c247ebd060d7 (patch) | |
tree | 0123999d430636663fe3d21f0ee0c9eb20e55331 /src/testdir/test_functions.vim | |
parent | 93723a4ef18f260b82d89759db2f1eeae730c4ec (diff) | |
download | vim-git-9966b21a57277986217aa28237d6c247ebd060d7.tar.gz |
patch 8.0.0794: checking translations fails with multiple NLv8.0.0794
Problem: The script to check translations fails if there is more than one
NL in one line.
Solution: Count the number of NL characters. Make count() accept a string.
Diffstat (limited to 'src/testdir/test_functions.vim')
-rw-r--r-- | src/testdir/test_functions.vim | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim index f0f656ac8..ac47ea1da 100644 --- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -635,7 +635,13 @@ func Test_count() call assert_equal(0, count(d, 'c', 1)) call assert_fails('call count(d, "a", 0, 1)', 'E474:') - call assert_fails('call count("a", "a")', 'E712:') + + call assert_equal(0, count("foo", "bar")) + call assert_equal(1, count("foo", "oo")) + call assert_equal(2, count("foo", "o")) + call assert_equal(0, count("foo", "O")) + call assert_equal(2, count("foo", "O", 1)) + call assert_equal(2, count("fooooo", "oo")) endfunc func Test_changenr() |