Mercurial > vim
comparison src/testdir/test_search.vim @ 19783:546bdeef35f1 v8.2.0448
patch 8.2.0448: various functions not properly tested
Commit: https://github.com/vim/vim/commit/0e05de46226eb4e5ea580beefa71831f92d613d3
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Mar 25 22:23:46 2020 +0100
patch 8.2.0448: various functions not properly tested
Problem: Various functions not properly tested.
Solution: Add more tests, especially for failures. (Yegappan Lakshmanan,
closes #5843)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 25 Mar 2020 22:30:04 +0100 |
parents | 599793519c85 |
children | 9cbe3a4f1492 |
comparison
equal
deleted
inserted
replaced
19782:e5f4316b01dd | 19783:546bdeef35f1 |
---|---|
1381 exe "normal /two\<CR>" | 1381 exe "normal /two\<CR>" |
1382 call search('.', 'c') | 1382 call search('.', 'c') |
1383 call assert_equal([3, 5], [line('.'), col('.')]) | 1383 call assert_equal([3, 5], [line('.'), col('.')]) |
1384 | 1384 |
1385 close! | 1385 close! |
1386 endfunc | |
1387 | |
1388 " Test for error cases with the search() function | |
1389 func Test_search_errors() | |
1390 call assert_fails("call search('pat', [])", 'E730:') | |
1391 call assert_fails("call search('pat', 'b', {})", 'E728:') | |
1392 call assert_fails("call search('pat', 'b', 1, [])", 'E745:') | |
1393 call assert_fails("call search('pat', 'ns')", 'E475:') | |
1394 call assert_fails("call search('pat', 'mr')", 'E475:') | |
1386 endfunc | 1395 endfunc |
1387 | 1396 |
1388 func Test_search_display_pattern() | 1397 func Test_search_display_pattern() |
1389 new | 1398 new |
1390 call setline(1, ['foo', 'bar', 'foobar']) | 1399 call setline(1, ['foo', 'bar', 'foobar']) |