Skip to content

Commit 231480f

Browse files
Millychrisbra
authored andcommitted
patch 9.1.0805: tests: minor issues in gen_opt_test.vim
Problem: tests: minor issues in gen_opt_test.vim Solution: fix restore value for 'undolevels', fix comment, fix wrong cpo value, add equality test for global-local options on switchback (Milly). closes: #15913 Signed-off-by: Milly <milly.ca@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent a441a3e commit 231480f

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

src/testdir/gen_opt_test.vim

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Script to generate src/testdir/opt_test.vim from src/optiondefs.h and
22
" runtime/doc/options.txt
33

4-
set cpo=&vim
4+
set cpo&vim
55

66
" Only do this when build with the +eval feature.
77
if 1
@@ -25,7 +25,7 @@ endwhile
2525
call extend(global_locals, #{
2626
\ scrolloff: -1,
2727
\ sidescrolloff: -1,
28-
\ undolevels: -12345,
28+
\ undolevels: -123456,
2929
\})
3030

3131
" Get local-noglobal options.
@@ -56,7 +56,8 @@ let skip_setglobal_reasons = #{
5656
\ textwidth: 'TODO: fix missing error handling for setglobal',
5757
\}
5858

59-
" The terminal size is restored at the end.
59+
" Script header.
60+
" The test values contains multibyte characters.
6061
let script = [
6162
\ '" DO NOT EDIT: Generated with gen_opt_test.vim',
6263
\ '" Used by test_options_all.vim.',
@@ -417,8 +418,9 @@ while 1
417418
endfor
418419
" Testing to clear the local value and switch back to the global value.
419420
if global_locals->has_key(fullname)
420-
let swichback_val = global_locals[fullname]
421-
call add(script, $'setlocal {opt}={swichback_val}')
421+
let switchback_val = global_locals[fullname]
422+
call add(script, $'setlocal {opt}={switchback_val}')
423+
call add(script, $'call assert_equal(&g:{fullname}, &{fullname})')
422424
endif
423425
endfor
424426

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static char *(features[]) =
704704

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
805,
707709
/**/
708710
804,
709711
/**/

0 commit comments

Comments
 (0)