To: vim_dev@googlegroups.com Subject: Patch 8.0.1418 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1418 Problem: No test for expanding backticks. Solution: Add a test. (Dominique Pelle, closes #2479) Files: src/testdir/test_normal.vim *** ../vim-8.0.1417/src/testdir/test_normal.vim 2017-11-05 20:59:12.528905134 +0100 --- src/testdir/test_normal.vim 2017-12-20 22:31:04.779977353 +0100 *************** *** 404,409 **** --- 404,418 ---- call assert_equal(expected[i], expand(''), 'i == ' . i) endfor + if executable('echo') + " Test expand(`...`) i.e. backticks command expansion. + " MS-Windows has a trailing space. + call assert_match('^abcde *$', expand('`echo abcde`')) + endif + + " Test expand(`=...`) i.e. backticks expression expansion + call assert_equal('5', expand('`=2+3`')) + " clean up bw! endfunc *************** *** 1537,1548 **** \ 'the ''{'' flag is in ''cpoptions'' then ''{'' in the first column is used as a', \ 'paragraph boundary |posix|.', \ '{', ! \ 'This is no paragaraph', \ 'unless the ''{'' is set', \ 'in ''cpoptions''', \ '}', \ '.IP', ! \ 'The nroff macros IP seperates a paragraph', \ 'That means, it must be a ''.''', \ 'followed by IP', \ '.LPIt does not matter, if afterwards some', --- 1546,1557 ---- \ 'the ''{'' flag is in ''cpoptions'' then ''{'' in the first column is used as a', \ 'paragraph boundary |posix|.', \ '{', ! \ 'This is no paragraph', \ 'unless the ''{'' is set', \ 'in ''cpoptions''', \ '}', \ '.IP', ! \ 'The nroff macros IP separates a paragraph', \ 'That means, it must be a ''.''', \ 'followed by IP', \ '.LPIt does not matter, if afterwards some', *************** *** 1557,1563 **** 1 norm! 0d2} call assert_equal(['.IP', ! \ 'The nroff macros IP seperates a paragraph', 'That means, it must be a ''.''', 'followed by IP', \ '.LPIt does not matter, if afterwards some', 'more characters follow.', '.SHAlso section boundaries from the nroff', \ 'macros terminate a paragraph. That means', 'a character like this:', '.NH', 'End of text here', ''], getline(1,'$')) norm! 0d} --- 1566,1572 ---- 1 norm! 0d2} call assert_equal(['.IP', ! \ 'The nroff macros IP separates a paragraph', 'That means, it must be a ''.''', 'followed by IP', \ '.LPIt does not matter, if afterwards some', 'more characters follow.', '.SHAlso section boundaries from the nroff', \ 'macros terminate a paragraph. That means', 'a character like this:', '.NH', 'End of text here', ''], getline(1,'$')) norm! 0d} *************** *** 1576,1596 **** set cpo+={ 1 norm! 0d2} ! call assert_equal(['{', 'This is no paragaraph', 'unless the ''{'' is set', 'in ''cpoptions''', '}', ! \ '.IP', 'The nroff macros IP seperates a paragraph', 'That means, it must be a ''.''', \ 'followed by IP', '.LPIt does not matter, if afterwards some', 'more characters follow.', \ '.SHAlso section boundaries from the nroff', 'macros terminate a paragraph. That means', \ 'a character like this:', '.NH', 'End of text here', ''], getline(1,'$')) $ norm! d} ! call assert_equal(['{', 'This is no paragaraph', 'unless the ''{'' is set', 'in ''cpoptions''', '}', ! \ '.IP', 'The nroff macros IP seperates a paragraph', 'That means, it must be a ''.''', \ 'followed by IP', '.LPIt does not matter, if afterwards some', 'more characters follow.', \ '.SHAlso section boundaries from the nroff', 'macros terminate a paragraph. That means', \ 'a character like this:', '.NH', 'End of text here', ''], getline(1,'$')) norm! gg} norm! d5} ! call assert_equal(['{', 'This is no paragaraph', 'unless the ''{'' is set', 'in ''cpoptions''', '}', ''], getline(1,'$')) " clean up set cpo-={ --- 1585,1605 ---- set cpo+={ 1 norm! 0d2} ! call assert_equal(['{', 'This is no paragraph', 'unless the ''{'' is set', 'in ''cpoptions''', '}', ! \ '.IP', 'The nroff macros IP separates a paragraph', 'That means, it must be a ''.''', \ 'followed by IP', '.LPIt does not matter, if afterwards some', 'more characters follow.', \ '.SHAlso section boundaries from the nroff', 'macros terminate a paragraph. That means', \ 'a character like this:', '.NH', 'End of text here', ''], getline(1,'$')) $ norm! d} ! call assert_equal(['{', 'This is no paragraph', 'unless the ''{'' is set', 'in ''cpoptions''', '}', ! \ '.IP', 'The nroff macros IP separates a paragraph', 'That means, it must be a ''.''', \ 'followed by IP', '.LPIt does not matter, if afterwards some', 'more characters follow.', \ '.SHAlso section boundaries from the nroff', 'macros terminate a paragraph. That means', \ 'a character like this:', '.NH', 'End of text here', ''], getline(1,'$')) norm! gg} norm! d5} ! call assert_equal(['{', 'This is no paragraph', 'unless the ''{'' is set', 'in ''cpoptions''', '}', ''], getline(1,'$')) " clean up set cpo-={ *** ../vim-8.0.1417/src/version.c 2017-12-19 22:25:35.271003070 +0100 --- src/version.c 2017-12-20 22:05:25.540330006 +0100 *************** *** 773,774 **** --- 773,776 ---- { /* Add new patch number below this line */ + /**/ + 1418, /**/ -- hundred-and-one symptoms of being an internet addict: 140. You'd rather catch a score on the web than watch the game as it is being played on tv. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///