diff options
author | Mohamed Akram <mohd.akram@outlook.com> | 2024-07-12 20:17:55 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-07-12 20:18:54 +0200 |
commit | c25a7084e9ae1f78c28ddcbe1fa23374cfdf1e03 (patch) | |
tree | cffa33c93a529b18c01b2930cd797c98a514717e /src/testdir/test_ex_mode.vim | |
parent | cb7928812e0dffac2750c9b0513915e17dfa116f (diff) |
patch 9.1.0573: ex: no implicit print for single addressesv9.1.0573
Problem: ex: no implicit print for single addresses
Solution: explicitly print even during single addresses,
as requested by POSIX (Mohamed Akram)
See the POSIX behaviour here:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ex.html#tag_20_40_13_03
Section 6b
closes: #15230
Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/testdir/test_ex_mode.vim')
-rw-r--r-- | src/testdir/test_ex_mode.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/testdir/test_ex_mode.vim b/src/testdir/test_ex_mode.vim index 6969d5ec04..b0e5d81a82 100644 --- a/src/testdir/test_ex_mode.vim +++ b/src/testdir/test_ex_mode.vim @@ -353,4 +353,15 @@ func Test_backslash_multiline2() call assert_equal(['X \\', "Y"], getline(1, 2)) endfunc +" Testing implicit print command +func Test_implicit_print() + new + call setline(1, ['one', 'two', 'three']) + call feedkeys('Q:let a=execute(":1,2")', 'xt') + call feedkeys('Q:let b=execute(":3")', 'xt') + call assert_equal('one two', a->split('\n')->join(' ')) + call assert_equal('three', b->split('\n')->join(' ')) + bw! +endfunc + " vim: shiftwidth=2 sts=2 expandtab |