Skip to content

Commit ae6f865

Browse files
committed
patch 8.0.1418: no test for expanding backticks
Problem: No test for expanding backticks. Solution: Add a test. (Dominique Pelle, closes #2479)
1 parent 1bd999f commit ae6f865

2 files changed

Lines changed: 19 additions & 8 deletions

File tree

src/testdir/test_normal.vim

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,15 @@ func! Test_normal10_expand()
404404
call assert_equal(expected[i], expand('<cexpr>'), 'i == ' . i)
405405
endfor
406406

407+
if executable('echo')
408+
" Test expand(`...`) i.e. backticks command expansion.
409+
" MS-Windows has a trailing space.
410+
call assert_match('^abcde *$', expand('`echo abcde`'))
411+
endif
412+
413+
" Test expand(`=...`) i.e. backticks expression expansion
414+
call assert_equal('5', expand('`=2+3`'))
415+
407416
" clean up
408417
bw!
409418
endfunc
@@ -1537,12 +1546,12 @@ fun! Test_normal29_brace()
15371546
\ 'the ''{'' flag is in ''cpoptions'' then ''{'' in the first column is used as a',
15381547
\ 'paragraph boundary |posix|.',
15391548
\ '{',
1540-
\ 'This is no paragaraph',
1549+
\ 'This is no paragraph',
15411550
\ 'unless the ''{'' is set',
15421551
\ 'in ''cpoptions''',
15431552
\ '}',
15441553
\ '.IP',
1545-
\ 'The nroff macros IP seperates a paragraph',
1554+
\ 'The nroff macros IP separates a paragraph',
15461555
\ 'That means, it must be a ''.''',
15471556
\ 'followed by IP',
15481557
\ '.LPIt does not matter, if afterwards some',
@@ -1557,7 +1566,7 @@ fun! Test_normal29_brace()
15571566
1
15581567
norm! 0d2}
15591568
call assert_equal(['.IP',
1560-
\ 'The nroff macros IP seperates a paragraph', 'That means, it must be a ''.''', 'followed by IP',
1569+
\ 'The nroff macros IP separates a paragraph', 'That means, it must be a ''.''', 'followed by IP',
15611570
\ '.LPIt does not matter, if afterwards some', 'more characters follow.', '.SHAlso section boundaries from the nroff',
15621571
\ 'macros terminate a paragraph. That means', 'a character like this:', '.NH', 'End of text here', ''], getline(1,'$'))
15631572
norm! 0d}
@@ -1576,21 +1585,21 @@ fun! Test_normal29_brace()
15761585
set cpo+={
15771586
1
15781587
norm! 0d2}
1579-
call assert_equal(['{', 'This is no paragaraph', 'unless the ''{'' is set', 'in ''cpoptions''', '}',
1580-
\ '.IP', 'The nroff macros IP seperates a paragraph', 'That means, it must be a ''.''',
1588+
call assert_equal(['{', 'This is no paragraph', 'unless the ''{'' is set', 'in ''cpoptions''', '}',
1589+
\ '.IP', 'The nroff macros IP separates a paragraph', 'That means, it must be a ''.''',
15811590
\ 'followed by IP', '.LPIt does not matter, if afterwards some', 'more characters follow.',
15821591
\ '.SHAlso section boundaries from the nroff', 'macros terminate a paragraph. That means',
15831592
\ 'a character like this:', '.NH', 'End of text here', ''], getline(1,'$'))
15841593
$
15851594
norm! d}
1586-
call assert_equal(['{', 'This is no paragaraph', 'unless the ''{'' is set', 'in ''cpoptions''', '}',
1587-
\ '.IP', 'The nroff macros IP seperates a paragraph', 'That means, it must be a ''.''',
1595+
call assert_equal(['{', 'This is no paragraph', 'unless the ''{'' is set', 'in ''cpoptions''', '}',
1596+
\ '.IP', 'The nroff macros IP separates a paragraph', 'That means, it must be a ''.''',
15881597
\ 'followed by IP', '.LPIt does not matter, if afterwards some', 'more characters follow.',
15891598
\ '.SHAlso section boundaries from the nroff', 'macros terminate a paragraph. That means',
15901599
\ 'a character like this:', '.NH', 'End of text here', ''], getline(1,'$'))
15911600
norm! gg}
15921601
norm! d5}
1593-
call assert_equal(['{', 'This is no paragaraph', 'unless the ''{'' is set', 'in ''cpoptions''', '}', ''], getline(1,'$'))
1602+
call assert_equal(['{', 'This is no paragraph', 'unless the ''{'' is set', 'in ''cpoptions''', '}', ''], getline(1,'$'))
15941603

15951604
" clean up
15961605
set cpo-={

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,8 @@ static char *(features[]) =
771771

772772
static int included_patches[] =
773773
{ /* Add new patch number below this line */
774+
/**/
775+
1418,
774776
/**/
775777
1417,
776778
/**/

0 commit comments

Comments
 (0)