Mercurial > vim
diff src/testdir/test_filter_map.vim @ 26907:6f43253463cc v8.2.3982
patch 8.2.3982: some lines of code not covered by tests
Commit: https://github.com/vim/vim/commit/8bfa0eb863357c1013024233ebb2e95a0a848002
Author: Dominique Pelle <dominique.pelle@gmail.com>
Date: Sun Jan 2 16:16:33 2022 +0000
patch 8.2.3982: some lines of code not covered by tests
Problem: Some lines of code not covered by tests.
Solution: Add a few more test cases. (Dominique Pell?, closes https://github.com/vim/vim/issues/9453)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 02 Jan 2022 17:30:02 +0100 |
parents | 31c23760d590 |
children | 4c16acb2525f |
line wrap: on
line diff
--- a/src/testdir/test_filter_map.vim +++ b/src/testdir/test_filter_map.vim @@ -151,7 +151,7 @@ func Test_filter_map_string() let lines =<< trim END VAR s = "abc" call filter(s, '"b" != v:val') - call assert_equal(s, s) + call assert_equal('abc', s) call assert_equal('ac', filter('abc', '"b" != v:val')) call assert_equal('あいうえお', filter('あxいxうxえxお', '"x" != v:val')) call assert_equal('あa😊💕💕b💕', filter('あxax😊x💕💕b💕x', '"x" != v:val')) @@ -172,7 +172,7 @@ func Test_filter_map_string() let lines =<< trim END VAR s = "abc" call map(s, 'nr2char(char2nr(v:val) + 2)') - call assert_equal(s, s) + call assert_equal('abc', s) call assert_equal('cde', map('abc', 'nr2char(char2nr(v:val) + 2)')) call assert_equal('[あ][i][う][え][お]', map('あiうえお', '"[" .. v:val .. "]"')) call assert_equal('[あ][a][😊][,][‱][‼][⁇][⁈][⁉][💕][b][💕][c][💕]', map('あa😊,‱‼⁇⁈⁉💕b💕c💕', '"[" .. v:val .. "]"')) @@ -191,7 +191,7 @@ func Test_filter_map_string() let lines =<< trim END VAR s = "abc" call mapnew(s, 'nr2char(char2nr(v:val) + 2)') - call assert_equal(s, s) + call assert_equal('abc', s) call assert_equal('cde', mapnew('abc', 'nr2char(char2nr(v:val) + 2)')) call assert_equal('[あ][i][う][え][お]', mapnew('あiうえお', '"[" .. v:val .. "]"')) call assert_equal('[あ][a][😊][,][‱][‼][⁇][⁈][⁉][💕][b][💕][c][💕]', mapnew('あa😊,‱‼⁇⁈⁉💕b💕c💕', '"[" .. v:val .. "]"'))