Mercurial > vim
comparison src/testdir/test_quickfix.vim @ 24590:2818f846f099 v8.2.2834
patch 8.2.2834: Vim9: :cexpr does not work with local variables
Commit: https://github.com/vim/vim/commit/5f7d4c049e934dbc8d2c3f2720797c10ee3c55c2
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed May 5 21:31:39 2021 +0200
patch 8.2.2834: Vim9: :cexpr does not work with local variables
Problem: Vim9: :cexpr does not work with local variables.
Solution: Compile :cexpr.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 05 May 2021 21:45:04 +0200 |
parents | 192058cad081 |
children | 437b8be91993 |
comparison
equal
deleted
inserted
replaced
24589:c770bde164ea | 24590:2818f846f099 |
---|---|
720 &rtp = rtp_save | 720 &rtp = rtp_save |
721 cclose | 721 cclose |
722 helpclose | 722 helpclose |
723 enddef | 723 enddef |
724 | 724 |
725 def Test_vim9_cexpr() | |
726 var text = 'somefile:95:error' | |
727 cexpr text | |
728 var l = getqflist() | |
729 assert_equal(1, l->len()) | |
730 assert_equal(95, l[0].lnum) | |
731 assert_equal('error', l[0].text) | |
732 | |
733 text = 'somefile:77:warning' | |
734 caddexpr text | |
735 l = getqflist() | |
736 assert_equal(2, l->len()) | |
737 assert_equal(77, l[1].lnum) | |
738 assert_equal('warning', l[1].text) | |
739 enddef | |
740 | |
725 func Test_errortitle() | 741 func Test_errortitle() |
726 augroup QfBufWinEnter | 742 augroup QfBufWinEnter |
727 au! | 743 au! |
728 au BufWinEnter * :let g:a=get(w:, 'quickfix_title', 'NONE') | 744 au BufWinEnter * :let g:a=get(w:, 'quickfix_title', 'NONE') |
729 augroup END | 745 augroup END |