Mercurial > vim
comparison src/testdir/gen_opt_test.vim @ 22742:f7f2d73ff85e v8.2.1919
patch 8.2.1919: assert_fails() setting emsg_silent changes normal execution
Commit: https://github.com/vim/vim/commit/28ee892ac4197421b3317f195512ca64cc56a5b4
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Oct 28 20:20:00 2020 +0100
patch 8.2.1919: assert_fails() setting emsg_silent changes normal execution
Problem: Assert_fails() setting emsg_silent changes normal execution.
Solution: Use a separate flag in_assert_fails.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 28 Oct 2020 20:30:04 +0100 |
parents | 595ea7f099cd |
children | 87accad5a407 |
comparison
equal
deleted
inserted
replaced
22741:8c4ba2a7a44f | 22742:f7f2d73ff85e |
---|---|
198 endfor | 198 endfor |
199 | 199 |
200 " setting an option can only fail when it's implemented. | 200 " setting an option can only fail when it's implemented. |
201 call add(script, "if exists('+" . name . "')") | 201 call add(script, "if exists('+" . name . "')") |
202 for val in a[1] | 202 for val in a[1] |
203 call add(script, "call assert_fails('set " . name . "=" . val . "')") | 203 call add(script, "silent! call assert_fails('set " . name . "=" . val . "')") |
204 call add(script, "call assert_fails('set " . shortname . "=" . val . "')") | 204 call add(script, "silent! call assert_fails('set " . shortname . "=" . val . "')") |
205 endfor | 205 endfor |
206 call add(script, "endif") | 206 call add(script, "endif") |
207 endif | 207 endif |
208 | 208 |
209 " cannot change 'termencoding' in GTK | 209 " cannot change 'termencoding' in GTK |