mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00
tests: Convert legacy test29
This commit is contained in:

committed by
Justin M. Keyes

parent
44175224cc
commit
e4c3ac1f82
@@ -14,7 +14,7 @@ SCRIPTS := test_autoformat_join.out \
|
||||
test11.out test12.out test13.out test14.out \
|
||||
test17.out \
|
||||
test24.out \
|
||||
test26.out test27.out test29.out test30.out \
|
||||
test26.out test27.out test30.out \
|
||||
test32.out test34.out \
|
||||
test36.out test37.out test39.out test40.out \
|
||||
test42.out test43.out test45.out \
|
||||
|
@@ -1,229 +0,0 @@
|
||||
Test for joining lines and marks in them
|
||||
in compatible and nocompatible modes
|
||||
and with 'joinspaces' set or not
|
||||
and with 'cpoptions' flag 'j' set or not
|
||||
|
||||
STARTTEST
|
||||
:so small.vim
|
||||
:set nojoinspaces
|
||||
:set cpoptions-=j
|
||||
/firstline/
|
||||
j"td/^STARTTEST/-1
|
||||
PJjJjJjJjJjJjJjJjJjJjJjJjJjJj05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions+=j
|
||||
j05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions-=j joinspaces
|
||||
j"tpJjJjJjJjJjJjJjJjJjJjJjJjJjJj05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions+=j
|
||||
j05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpo+=qo
|
||||
j"tpJjJjJjJjJjJjJjJjJjJjJjJjJjJj4Jy3l$pjd/STARTTEST/-2
|
||||
ENDTEST
|
||||
|
||||
firstline
|
||||
asdfasdf.
|
||||
asdf
|
||||
asdfasdf.
|
||||
asdf
|
||||
asdfasdf.
|
||||
asdf
|
||||
asdfasdf.
|
||||
asdf
|
||||
asdfasdf.
|
||||
asdf
|
||||
asdfasdf.
|
||||
asdf
|
||||
asdfasdf.
|
||||
asdf
|
||||
asdfasdf
|
||||
asdf
|
||||
asdfasdf
|
||||
asdf
|
||||
asdfasdf
|
||||
asdf
|
||||
asdfasdf
|
||||
asdf
|
||||
asdfasdf
|
||||
asdf
|
||||
asdfasdf
|
||||
asdf
|
||||
asdfasdf
|
||||
asdf
|
||||
zx cvn.
|
||||
as dfg?
|
||||
hjkl iop!
|
||||
ert
|
||||
zx cvn.
|
||||
as dfg?
|
||||
hjkl iop!
|
||||
ert
|
||||
|
||||
STARTTEST
|
||||
/^{/+1
|
||||
:set comments=s1:/*,mb:*,ex:*/,://
|
||||
:set nojoinspaces fo=j
|
||||
:set backspace=eol,start
|
||||
:.,+3join
|
||||
j4J
|
||||
:.,+2join
|
||||
j3J
|
||||
:.,+2join
|
||||
j3J
|
||||
:.,+2join
|
||||
jj3J
|
||||
ENDTEST
|
||||
|
||||
{
|
||||
|
||||
/*
|
||||
* Make sure the previous comment leader is not removed.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Make sure the previous comment leader is not removed.
|
||||
*/
|
||||
|
||||
// Should the next comment leader be left alone?
|
||||
// Yes.
|
||||
|
||||
// Should the next comment leader be left alone?
|
||||
// Yes.
|
||||
|
||||
/* Here the comment leader should be left intact. */
|
||||
// And so should this one.
|
||||
|
||||
/* Here the comment leader should be left intact. */
|
||||
// And so should this one.
|
||||
|
||||
if (condition) // Remove the next comment leader!
|
||||
// OK, I will.
|
||||
action();
|
||||
|
||||
if (condition) // Remove the next comment leader!
|
||||
// OK, I will.
|
||||
action();
|
||||
}
|
||||
|
||||
STARTTEST
|
||||
:" Test with backspace set to the non-compatible setting
|
||||
/^\d\+ this
|
||||
:set bs=2
|
||||
Avim1
|
||||
Avim2u
|
||||
:set cpo-=<
|
||||
:inoremap <c-u> <left><c-u>
|
||||
Avim3
|
||||
:iunmap <c-u>
|
||||
Avim4
|
||||
:" Test with backspace set to the compatible setting
|
||||
:set bs=
|
||||
A vim5A
|
||||
A vim6Azweiu
|
||||
:inoremap <c-u> <left><c-u>
|
||||
A vim7
|
||||
:set noesckeys
|
||||
ENDTEST
|
||||
1 this shouldn't be deleted
|
||||
2 this shouldn't be deleted
|
||||
3 this shouldn't be deleted
|
||||
4 this should be deleted
|
||||
5 this shouldn't be deleted
|
||||
6 this shouldn't be deleted
|
||||
7 this shouldn't be deleted
|
||||
8 this shouldn't be deleted (not touched yet)
|
||||
|
||||
STARTTEST
|
||||
/^{/+1
|
||||
:set comments=sO:*\ -,mO:*\ \ ,exO:*/
|
||||
:set comments+=s1:/*,mb:*,ex:*/,://
|
||||
:set comments+=s1:>#,mb:#,ex:#<,:<
|
||||
:set cpoptions-=j joinspaces fo=j
|
||||
:set backspace=eol,start
|
||||
:.,+3join
|
||||
j4J
|
||||
:.,+8join
|
||||
j9J
|
||||
:.,+2join
|
||||
j3J
|
||||
:.,+2join
|
||||
j3J
|
||||
:.,+2join
|
||||
jj3J
|
||||
j:.,+2join
|
||||
jj3J
|
||||
j:.,+5join
|
||||
j6J
|
||||
oSome code!
|
||||
// Make sure backspacing does not remove this comment leader.0i
|
||||
ENDTEST
|
||||
|
||||
{
|
||||
|
||||
/*
|
||||
* Make sure the previous comment leader is not removed.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Make sure the previous comment leader is not removed.
|
||||
*/
|
||||
|
||||
/* List:
|
||||
* - item1
|
||||
* foo bar baz
|
||||
* foo bar baz
|
||||
* - item2
|
||||
* foo bar baz
|
||||
* foo bar baz
|
||||
*/
|
||||
|
||||
/* List:
|
||||
* - item1
|
||||
* foo bar baz
|
||||
* foo bar baz
|
||||
* - item2
|
||||
* foo bar baz
|
||||
* foo bar baz
|
||||
*/
|
||||
|
||||
// Should the next comment leader be left alone?
|
||||
// Yes.
|
||||
|
||||
// Should the next comment leader be left alone?
|
||||
// Yes.
|
||||
|
||||
/* Here the comment leader should be left intact. */
|
||||
// And so should this one.
|
||||
|
||||
/* Here the comment leader should be left intact. */
|
||||
// And so should this one.
|
||||
|
||||
if (condition) // Remove the next comment leader!
|
||||
// OK, I will.
|
||||
action();
|
||||
|
||||
if (condition) // Remove the next comment leader!
|
||||
// OK, I will.
|
||||
action();
|
||||
|
||||
int i = 7 /* foo *// 3
|
||||
// comment
|
||||
;
|
||||
|
||||
int i = 7 /* foo *// 3
|
||||
// comment
|
||||
;
|
||||
|
||||
># Note that the last character of the ending comment leader (left angle
|
||||
# bracket) is a comment leader itself. Make sure that this comment leader is
|
||||
# not removed from the next line #<
|
||||
< On this line a new comment is opened which spans 2 lines. This comment should
|
||||
< retain its comment leader.
|
||||
|
||||
># Note that the last character of the ending comment leader (left angle
|
||||
# bracket) is a comment leader itself. Make sure that this comment leader is
|
||||
# not removed from the next line #<
|
||||
< On this line a new comment is opened which spans 2 lines. This comment should
|
||||
< retain its comment leader.
|
||||
|
||||
}
|
||||
|
||||
STARTTEST
|
||||
:g/^STARTTEST/.,/^ENDTEST/d
|
||||
:?firstline?+1,$w! test.out
|
||||
:qa!
|
@@ -1,97 +0,0 @@
|
||||
asdfasdf. asdf
|
||||
asdfasdf. asdf
|
||||
asdfasdf. asdf
|
||||
asdfasdf. asdf
|
||||
asdfasdf. asdf
|
||||
asdfasdf. asdf
|
||||
asdfasdf. asdf
|
||||
asdfasdf asdf
|
||||
asdfasdf asdf
|
||||
asdfasdf asdf
|
||||
asdfasdf asdf
|
||||
asdfasdf asdf
|
||||
asdfasdf asdf
|
||||
asdfasdf asdf
|
||||
zx cvn. as dfg? hjkl iop! ert ernop
|
||||
zx cvn. as dfg? hjkl iop! ert ernop
|
||||
|
||||
asdfasdf. asdf
|
||||
asdfasdf. asdf
|
||||
asdfasdf. asdf
|
||||
asdfasdf. asdf
|
||||
asdfasdf. asdf
|
||||
asdfasdf. asdf
|
||||
asdfasdf. asdf
|
||||
asdfasdf asdf
|
||||
asdfasdf asdf
|
||||
asdfasdf asdf
|
||||
asdfasdf asdf
|
||||
asdfasdf asdf
|
||||
asdfasdf asdf
|
||||
asdfasdf asdf
|
||||
zx cvn. as dfg? hjkl iop! ert enop
|
||||
zx cvn. as dfg? hjkl iop! ert ernop
|
||||
|
||||
asdfasdf. asdf
|
||||
asdfasdf. asdf
|
||||
asdfasdf. asdf
|
||||
asdfasdf. asdf
|
||||
asdfasdf. asdf
|
||||
asdfasdf. asdf
|
||||
asdfasdf. asdf
|
||||
asdfasdf asdf
|
||||
asdfasdf asdf
|
||||
asdfasdf asdf
|
||||
asdfasdf asdf
|
||||
asdfasdf asdf
|
||||
asdfasdf asdf
|
||||
asdfasdf asdf
|
||||
zx cvn. as dfg? hjkl iop! ert a
|
||||
|
||||
|
||||
{
|
||||
/* Make sure the previous comment leader is not removed. */
|
||||
/* Make sure the previous comment leader is not removed. */
|
||||
// Should the next comment leader be left alone? Yes.
|
||||
// Should the next comment leader be left alone? Yes.
|
||||
/* Here the comment leader should be left intact. */ // And so should this one.
|
||||
/* Here the comment leader should be left intact. */ // And so should this one.
|
||||
if (condition) // Remove the next comment leader! OK, I will.
|
||||
action();
|
||||
if (condition) // Remove the next comment leader! OK, I will.
|
||||
action();
|
||||
}
|
||||
|
||||
1 this shouldn't be deleted
|
||||
2 this shouldn't be deleted
|
||||
3 this shouldn't be deleted
|
||||
4 this should be deleted3
|
||||
|
||||
6 this shouldn't be deleted vim5
|
||||
7 this shouldn't be deleted vim6
|
||||
8 this shouldn't be deleted (not touched yet) vim7
|
||||
|
||||
|
||||
{
|
||||
/* Make sure the previous comment leader is not removed. */
|
||||
/* Make sure the previous comment leader is not removed. */
|
||||
/* List: item1 foo bar baz foo bar baz item2 foo bar baz foo bar baz */
|
||||
/* List: item1 foo bar baz foo bar baz item2 foo bar baz foo bar baz */
|
||||
// Should the next comment leader be left alone? Yes.
|
||||
// Should the next comment leader be left alone? Yes.
|
||||
/* Here the comment leader should be left intact. */ // And so should this one.
|
||||
/* Here the comment leader should be left intact. */ // And so should this one.
|
||||
if (condition) // Remove the next comment leader! OK, I will.
|
||||
action();
|
||||
if (condition) // Remove the next comment leader! OK, I will.
|
||||
action();
|
||||
int i = 7 /* foo *// 3 // comment
|
||||
;
|
||||
int i = 7 /* foo *// 3 // comment
|
||||
;
|
||||
># Note that the last character of the ending comment leader (left angle bracket) is a comment leader itself. Make sure that this comment leader is not removed from the next line #< < On this line a new comment is opened which spans 2 lines. This comment should retain its comment leader.
|
||||
># Note that the last character of the ending comment leader (left angle bracket) is a comment leader itself. Make sure that this comment leader is not removed from the next line #< < On this line a new comment is opened which spans 2 lines. This comment should retain its comment leader.
|
||||
|
||||
Some code!// Make sure backspacing does not remove this comment leader.
|
||||
}
|
||||
|
Reference in New Issue
Block a user