annotate src/testdir/test84.in @ 8631:e5f2e0f8af10 v7.4.1605

commit https://github.com/vim/vim/commit/3905e291fe4375ca5c59efa9ffcb01a39c7be3a9 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 19 18:44:08 2016 +0100 patch 7.4.1605 Problem: Catching exception that won't be thrown. Solution: Remove try/catch.
author Christian Brabandt <cb@256bit.org>
date Sat, 19 Mar 2016 18:45:05 +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