mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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.
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user