view src/testdir/test14.in @ 16150:b23048205589 v8.1.1080

patch 8.1.1080: when a screendump test fails, moving the file is a hassle commit https://github.com/vim/vim/commit/ef7f0e367eeaf6fb31b1caa0e3de1a4b07e86af3 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 30 15:59:51 2019 +0100 patch 8.1.1080: when a screendump test fails, moving the file is a hassle Problem: When a screendump test fails, moving the file is a hassle. Solution: Instead of appending ".failed" to the file name, keep the same file name but put the screendump in the "failed" directory. Then the file name only needs to be typed once when moving a screendump.
author Bram Moolenaar <Bram@vim.org>
date Sat, 30 Mar 2019 16:00:06 +0100
parents ae45d497868f
children
line wrap: on
line source

Tests for "vaBiB", end could be wrong.
Also test ":s/pat/sub/" with different ~s in sub.
Also test for ^Vxff and ^Vo123 in Insert mode.
Also test "[m", "]m", "[M" and "]M"
Also test search()

STARTTEST
:so small.vim
:set belloff=all
/Start cursor here
vaBiBD:?Bug?,/Piece/-2w! test.out
/^- Bug
:s/u/~u~/
:s/i/~u~/
:s/o/~~~/
:.w >>test.out
:if has("ebcdic")
: let tt = "o\<C-V>193\<C-V>xc2\<C-V>o303 \<C-V>90a\<C-V>xfg\<C-V>o578\<Esc>"
:else
: let tt = "o\<C-V>65\<C-V>x42\<C-V>o103 \<C-V>33a\<C-V>xfg\<C-V>o78\<Esc>"
:endif
:exe "normal " . tt
:unlet tt
:.w >>test.out
:set vb
/^Piece
2]maA:.w >>test.out
j]maB:.w >>test.out
]maC:.w >>test.out
[maD:.w >>test.out
k2[maE:.w >>test.out
3[maF:.w >>test.out
]MaG:.w >>test.out
j2]MaH:.w >>test.out
]M]MaI:.w >>test.out
2[MaJ:.w >>test.out
k[MaK:.w >>test.out
3[MaL:.w >>test.out
:"
/^foobar
:let startline = line('.')
:call search('foobar', 'c')
:call append(line('$'), line('.') - startline)
j:call search('^$', 'c')
:call append(line('$'), line('.') - startline)
:call search('^$', 'bc')
:call append(line('$'), line('.') - startline)
/two
:call search('.', 'c')
:call append(line('$'), getline('.')[col('.') - 1:])
:"
/^substitute
:s/foo/bar/
:$put =@/
/^substitute
:keeppatterns s/asdf/xyz/
:$put =@/
/^substitute
Y:$put =@0
/bar /e
:$put =@0
-:keeppatterns /xyz
0dn:/^search()/,$w >>test.out
:qa!
ENDTEST

- Bug in "vPPPP" on this text (Webb):
	{
		cmd;
		{
			cmd;	/* <-- Start cursor here */
			{
			}
		}
	}

Piece of Java
{
	tt m1 {
		t1;
	} e1

	tt m2 {
		t2;
	} e2

	tt m3 {
		if (x)
		{
			t3;
		}
	} e3
}

foobar

substitute foo asdf

one two
search()