annotate src/testdir/test84.in @ 6999:dc1b678f0e4e v7.4.817

patch 7.4.817 Problem: Invalid memory access in file_pat_to_reg_pat(). Solution: Use vim_isspace() instead of checking for a space only. (Dominique Pelle)
author Bram Moolenaar <bram@vim.org>
date Tue, 11 Aug 2015 16:20:05 +0200
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