Mercurial > vim
comparison src/testdir/test_quickfix.vim @ 18000:7a19c8d6bb9e v8.1.1996
patch 8.1.1996: more functions can be used as methods
Commit: https://github.com/vim/vim/commit/aad222c9c9a1e4fe6ae5a1fe95bb084619be0e65
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Sep 6 22:46:09 2019 +0200
patch 8.1.1996: more functions can be used as methods
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 06 Sep 2019 23:00:03 +0200 |
parents | 9606c0adc148 |
children | 8a2fb21c23c0 |
comparison
equal
deleted
inserted
replaced
17999:9fd4d58b3e5b | 18000:7a19c8d6bb9e |
---|---|
709 for word in words | 709 for word in words |
710 call add(qflist, {'filename': 'test://' . word . '.txt', 'text': 'file ' . word . '.txt', }) | 710 call add(qflist, {'filename': 'test://' . word . '.txt', 'text': 'file ' . word . '.txt', }) |
711 " NOTE: problem 1: | 711 " NOTE: problem 1: |
712 " intentionally not setting 'lnum' so that the quickfix entries are not | 712 " intentionally not setting 'lnum' so that the quickfix entries are not |
713 " valid | 713 " valid |
714 call setloclist(0, qflist, ' ') | 714 eval qflist->setloclist(0, ' ') |
715 endfor | 715 endfor |
716 | 716 |
717 " Test A | 717 " Test A |
718 lrewind | 718 lrewind |
719 enew | 719 enew |
1513 call assert_fails("call g:Xsetlist(list1, 0)", 'E928:') | 1513 call assert_fails("call g:Xsetlist(list1, 0)", 'E928:') |
1514 endfunc | 1514 endfunc |
1515 | 1515 |
1516 func Test_setqflist_invalid_nr() | 1516 func Test_setqflist_invalid_nr() |
1517 " The following command used to crash Vim | 1517 " The following command used to crash Vim |
1518 call setqflist([], ' ', {'nr' : $XXX_DOES_NOT_EXIST}) | 1518 eval []->setqflist(' ', {'nr' : $XXX_DOES_NOT_EXIST}) |
1519 endfunc | 1519 endfunc |
1520 | 1520 |
1521 func Test_quickfix_set_list_with_act() | 1521 func Test_quickfix_set_list_with_act() |
1522 call XquickfixSetListWithAct('c') | 1522 call XquickfixSetListWithAct('c') |
1523 call XquickfixSetListWithAct('l') | 1523 call XquickfixSetListWithAct('l') |