Mercurial > vim
comparison src/testdir/test_autocmd.vim @ 17698:131f1d8c5860 v8.1.1846
patch 8.1.1846: inconsistently using GetVimCommand() and v:progpath
commit https://github.com/vim/vim/commit/93344c2d707d9953f351c944e6a237c9916f69a3
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 14 21:12:05 2019 +0200
patch 8.1.1846: inconsistently using GetVimCommand() and v:progpath
Problem: Inconsistently using GetVimCommand() and v:progpath. (Daniel
Hahler)
Solution: Use GetVimCommand(). (closes #4806)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 14 Aug 2019 21:15:06 +0200 |
parents | 0da9bc55c31a |
children | 9606c0adc148 |
comparison
equal
deleted
inserted
replaced
17697:1d0133ac3c3b | 17698:131f1d8c5860 |
---|---|
437 endfunc | 437 endfunc |
438 au VimLeave * call WriteErrors() | 438 au VimLeave * call WriteErrors() |
439 [CODE] | 439 [CODE] |
440 | 440 |
441 call writefile(content, 'Xvimrc') | 441 call writefile(content, 'Xvimrc') |
442 call system(v:progpath. ' -u Xvimrc --not-a-term --noplugins -S Session.vim -c cq') | 442 call system(GetVimCommand('Xvimrc') .. ' --not-a-term --noplugins -S Session.vim -c cq') |
443 let errors = join(readfile('Xerrors')) | 443 let errors = join(readfile('Xerrors')) |
444 call assert_match('E814', errors) | 444 call assert_match('E814', errors) |
445 | 445 |
446 set swapfile | 446 set swapfile |
447 for file in ['Session.vim', 'Xvimrc', 'Xerrors'] | 447 for file in ['Session.vim', 'Xvimrc', 'Xerrors'] |
477 endfunc | 477 endfunc |
478 au VimLeave * call WriteErrors() | 478 au VimLeave * call WriteErrors() |
479 [CODE] | 479 [CODE] |
480 | 480 |
481 call writefile(content, 'Xvimrc') | 481 call writefile(content, 'Xvimrc') |
482 call system(v:progpath. ' -u Xvimrc --not-a-term --noplugins -S Session.vim -c cq') | 482 call system(GetVimCommand('Xvimrc') .. ' --not-a-term --noplugins -S Session.vim -c cq') |
483 let errors = join(readfile('Xerrors')) | 483 let errors = join(readfile('Xerrors')) |
484 " This probably only ever matches on unix. | 484 " This probably only ever matches on unix. |
485 call assert_notmatch('Caught deadly signal SEGV', errors) | 485 call assert_notmatch('Caught deadly signal SEGV', errors) |
486 call assert_match('SessionLoadPost DONE', errors) | 486 call assert_match('SessionLoadPost DONE', errors) |
487 | 487 |
1420 [CODE] | 1420 [CODE] |
1421 | 1421 |
1422 call writefile(content, 'Xtest') | 1422 call writefile(content, 'Xtest') |
1423 | 1423 |
1424 call delete('Xout') | 1424 call delete('Xout') |
1425 call system(v:progpath. ' --clean -N --not-a-term -S Xtest') | 1425 call system(GetVimCommandClean() .. ' -N --not-a-term -S Xtest') |
1426 call assert_true(filereadable('Xout')) | 1426 call assert_true(filereadable('Xout')) |
1427 | 1427 |
1428 call delete('Xxx1') | 1428 call delete('Xxx1') |
1429 call delete('Xxx2') | 1429 call delete('Xxx2') |
1430 call delete('Xtest') | 1430 call delete('Xtest') |