annotate src/testdir/test_scroll_opt.vim @ 21765:08940efa6b4e v8.2.1432

patch 8.2.1432: various inconsistencies in test files Commit: https://github.com/vim/vim/commit/6d91bcb4d23b5c6a0be72c384beaf385e2d9d606 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 12 18:50:36 2020 +0200 patch 8.2.1432: various inconsistencies in test files Problem: Various inconsistencies in test files. Solution: Add modelines where they were missing. Use Check commands instead of silently skipping over tests. Adjust indents and comments. (Ken Takata, closes #6695)
author Bram Moolenaar <Bram@vim.org>
date Wed, 12 Aug 2020 19:00:08 +0200
parents f8f505ffc0a6
children 6c6ac189a05f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12718
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Test for reset 'scroll'
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 func Test_reset_scroll()
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 let scr = &l:scroll
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 setlocal scroll=1
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 setlocal scroll&
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 call assert_equal(scr, &l:scroll)
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 setlocal scroll=1
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 setlocal scroll=0
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 call assert_equal(scr, &l:scroll)
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 try
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 execute 'setlocal scroll=' . (winheight(0) + 1)
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 " not reached
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 call assert_false(1)
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 catch
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 call assert_exception('E49:')
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 endtry
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22 split
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 let scr = &l:scroll
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 setlocal scroll=1
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 setlocal scroll&
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28 call assert_equal(scr, &l:scroll)
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 setlocal scroll=1
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31 setlocal scroll=0
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32 call assert_equal(scr, &l:scroll)
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34 quit!
f8f505ffc0a6 patch 8.0.1237: ":set scroll&" often gives an error
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
35 endfunc
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 12718
diff changeset
36
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 12718
diff changeset
37 " vim: shiftwidth=2 sts=2 expandtab