Mercurial > vim
annotate src/testdir/test49.in @ 21305:91d4af3309e7 v8.2.1203
patch 8.2.1203: unused assignments in expression evaluation
Commit: https://github.com/vim/vim/commit/3ac9c4701a5f1e39303ca2885956db92215966db
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jul 13 21:28:03 2020 +0200
patch 8.2.1203: unused assignments in expression evaluation
Problem: Unused assignments in expression evaluation.
Solution: Move declarations and assignments to inner blocks where possible.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 13 Jul 2020 21:30:04 +0200 |
parents | b55b4a21f006 |
children |
rev | line source |
---|---|
7 | 1 This is a test of the script language. |
2 | |
3 If after adding a new test, the test output doesn't appear properly in | |
5905 | 4 test49.failed, try to add one or more "G"s at the line ending in "test.out" |
7 | 5 |
6 STARTTEST | |
7 :so small.vim | |
16760
b55b4a21f006
patch 8.1.1382: error when editing test file
Bram Moolenaar <Bram@vim.org>
parents:
16728
diff
changeset
|
8 :se nocp nomore viminfo+=nviminfo |
1539 | 9 :lang mess C |
7 | 10 :so test49.vim |
7387
702f694c9396
commit https://github.com/vim/vim/commit/f9c8bd2137b045f9a64d63eefcf022b4726b1419
Christian Brabandt <cb@256bit.org>
parents:
5905
diff
changeset
|
11 :" Go back to this file and append the results from register r. |
702f694c9396
commit https://github.com/vim/vim/commit/f9c8bd2137b045f9a64d63eefcf022b4726b1419
Christian Brabandt <cb@256bit.org>
parents:
5905
diff
changeset
|
12 :buf test49.in |
702f694c9396
commit https://github.com/vim/vim/commit/f9c8bd2137b045f9a64d63eefcf022b4726b1419
Christian Brabandt <cb@256bit.org>
parents:
5905
diff
changeset
|
13 G"rp:/^Results/,$w! test.out |
1405 | 14 :" |
15 :" make valgrind happy | |
16 :redir => funclist | |
17 :silent func | |
18 :redir END | |
19 :for line in split(funclist, "\n") | |
20 : let name = matchstr(line, 'function \zs[A-Z]\w*\ze(') | |
21 : if name != '' | |
22 : exe "delfunc " . name | |
23 : endif | |
24 :endfor | |
25 :for v in keys(g:) | |
26 : silent! exe "unlet " . v | |
27 :endfor | |
28 :unlet v | |
29 :qa! | |
7 | 30 ENDTEST |
31 | |
32 Results of test49.vim: |