mirror of
https://github.com/neovim/neovim.git
synced 2025-10-14 13:56:05 +00:00
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:
@@ -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()
|
||||
|
Reference in New Issue
Block a user