annotate src/testdir/test84.in @ 10482:712acb0ad6a8 v8.0.0134

commit https://github.com/vim/vim/commit/c4bfedabe057c05f09a455a5851089e177fa9c00 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Dec 14 21:42:00 2016 +0100 patch 8.0.0134 Problem: Null pointer access reported by UBsan. Solution: Check curwin->w_buffer is not NULL. (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Wed, 14 Dec 2016 21:45:04 +0100
parents 21219ffc9790
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3443
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 Tests for curswant not changing when setting an option
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 STARTTEST
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 :so small.vim
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 :/^start target options$/+1,/^end target options$/-1 yank
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 :let target_option_names = split(@0)
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 :function TestCurswant(option_name)
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 : normal! ggf8j
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 : let curswant_before = winsaveview().curswant
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 : execute 'let' '&'.a:option_name '=' '&'.a:option_name
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 : let curswant_after = winsaveview().curswant
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 : return [a:option_name, curswant_before, curswant_after]
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 :endfunction
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 :
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 :new
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 :put =['1234567890', '12345']
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 :1 delete _
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 :let result = []
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 :for option_name in target_option_names
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 : call add(result, TestCurswant(option_name))
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 :endfor
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 :
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 :new
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 :put =map(copy(result), 'join(v:val, '' '')')
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 :1 delete _
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 :write test.out
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 :
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 :qall!
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 ENDTEST
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 start target options
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 tabstop
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 timeoutlen
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 ttimeoutlen
21219ffc9790 updated for version 7.3.487
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 end target options