vim-patch:8.0.0794: checking translations fails with multiple NL

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.
9966b21a57
This commit is contained in:
Jan Edmund Lazo
2018-07-23 11:27:16 -04:00
parent d551a49958
commit 1ed5abfe88
4 changed files with 49 additions and 16 deletions

View File

@@ -680,7 +680,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()