diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-05-30 13:26:21 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-05-30 13:26:21 +0200 |
commit | 644fdff7c1a80b3cf9a52f422df7f7ed2a084072 (patch) | |
tree | 6126ef1d44c7149de26bca96702b0a123868cfe2 /src/testdir/test72.in | |
parent | 9db580634c0055674017eab535b1b9eec7d6939d (diff) |
A few more fixes for undo file. Split test in two parts so that it doesn't
fail with tiny features.
Diffstat (limited to 'src/testdir/test72.in')
-rw-r--r-- | src/testdir/test72.in | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/testdir/test72.in b/src/testdir/test72.in new file mode 100644 index 0000000000..a5674b5272 --- /dev/null +++ b/src/testdir/test72.in @@ -0,0 +1,60 @@ +Tests for undo file. +Since this script is sourced we need to explicitly break changes up in +undo-able pieces. Do that by setting 'undolevels'. + +STARTTEST +:so small.vim +:" +:" Test 'undofile': first a simple one-line change. +:set nocp ul=100 undofile +:e! Xtestfile +ggdGithis is one line:set ul=100 +:s/one/ONE/ +:set ul=100 +:w +:bwipe! +:e Xtestfile +u:.w! test.out +:" +:" Test 'undofile', change in original file fails check +:set noundofile +:e! Xtestfile +:s/line/Line/ +:w +:set undofile +:bwipe! +:e Xtestfile +u:.w >>test.out +:" +:" Test 'undofile', add 10 lines, delete 6 lines, undo 3 +:set undofile +ggdGione +two +three +four +five +six +seven +eight +nine +ten:set ul=100 +3Gdd:set ul=100 +dd:set ul=100 +dd:set ul=100 +dd:set ul=100 +dd:set ul=100 +dd:set ul=100 +:w +:bwipe! +:e Xtestfile +uuu:w >>test.out +:" +:" Rename the undo file so that it gets cleaned up. +:call rename(".Xtestfile.un~", "Xtestundo") +:qa! +ENDTEST + +1111 ----- +2222 ----- + +123456789 |