diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2016-02-01 01:47:37 -0500 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2016-02-01 01:47:37 -0500 |
| commit | 1d995bb35706c67b87280244fce6ebdcd2e7acb5 (patch) | |
| tree | 48fb61734f6adf59ee0c38df1450358ad7ce47dd /src/nvim/testdir | |
| parent | 5ee87c68b792b4a704200b4e51ba948833b9cbfb (diff) | |
| parent | 228d236bdfd85721840e7ea7935fe0060a65fa93 (diff) | |
| download | rneovim-1d995bb35706c67b87280244fce6ebdcd2e7acb5.tar.gz rneovim-1d995bb35706c67b87280244fce6ebdcd2e7acb5.tar.bz2 rneovim-1d995bb35706c67b87280244fce6ebdcd2e7acb5.zip | |
Merge pull request #4013 from watiko/vim-increment
Vim patches related to increment and marks
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/Makefile | 3 | ||||
| -rw-r--r-- | src/nvim/testdir/test_marks.in | 34 | ||||
| -rw-r--r-- | src/nvim/testdir/test_marks.ok | 16 |
3 files changed, 52 insertions, 1 deletions
diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile index 41ce2daa91..fe511166f2 100644 --- a/src/nvim/testdir/Makefile +++ b/src/nvim/testdir/Makefile @@ -28,6 +28,7 @@ SCRIPTS := \ test_charsearch.out \ test_close_count.out \ test_command_count.out \ + test_marks.out \ NEW_TESTS = @@ -131,7 +132,7 @@ test1.out: .gdbinit test1.in # Check if the test.out file matches test.ok. @/bin/sh -c "if test -f test.out; then \ - if diff test.out $*.ok; then \ + if diff -u test.out $*.ok; then \ mv -f test.out $*.out; \ else \ echo $* FAILED >> test.log; \ diff --git a/src/nvim/testdir/test_marks.in b/src/nvim/testdir/test_marks.in new file mode 100644 index 0000000000..23c2fb65fe --- /dev/null +++ b/src/nvim/testdir/test_marks.in @@ -0,0 +1,34 @@ +Tests for marks. + +STARTTEST +:so small.vim +:" test that a deleted mark is restored after delete-undo-redo-undo +:/^\t/+1 +:set nocp viminfo+=nviminfo +madduu +:let a = string(getpos("'a")) +:$put ='Mark after delete-undo-redo-undo: '.a +:'' +ENDTEST + + textline A + textline B + textline C + +STARTTEST +:" test that CTRL-A and CTRL-X updates last changed mark '[, ']. +:/^123/ +:execute "normal! \<C-A>`[v`]rAjwvjw\<C-X>`[v`]rX" +ENDTEST + +CTRL-A CTRL-X: +123 123 123 +123 123 123 +123 123 123 + +STARTTEST +:g/^STARTTEST/.,/^ENDTEST/d +:wq! test.out +ENDTEST + +Results: diff --git a/src/nvim/testdir/test_marks.ok b/src/nvim/testdir/test_marks.ok new file mode 100644 index 0000000000..e6c02ee7b0 --- /dev/null +++ b/src/nvim/testdir/test_marks.ok @@ -0,0 +1,16 @@ +Tests for marks. + + + textline A + textline B + textline C + + +CTRL-A CTRL-X: +AAA 123 123 +123 XXXXXXX +XXX 123 123 + + +Results: +Mark after delete-undo-redo-undo: [0, 15, 2, 0] |