patch 8.1.0387: no test for 'ambiwidth' detection
Problem: No test for 'ambiwidth' detection.
Solution: Add a test.
diff --git a/src/testdir/test_startup_utf8.vim b/src/testdir/test_startup_utf8.vim
index d179a4c..ef1a997 100644
--- a/src/testdir/test_startup_utf8.vim
+++ b/src/testdir/test_startup_utf8.vim
@@ -4,6 +4,7 @@
endif
source shared.vim
+source screendump.vim
func Test_read_stdin_utf8()
let linesin = ['ใในใ', '€ÀÈÌÒÙ']
@@ -62,3 +63,24 @@
call delete('Xtestout')
call delete('Xtestin')
endfunc
+
+func Test_detect_ambiwidth()
+ if !CanRunVimInTerminal()
+ return
+ endif
+
+ " Use the title termcap entries to output the escape sequence.
+ call writefile([
+ \ 'set enc=utf-8',
+ \ 'set ambiwidth=double',
+ \ 'call test_option_not_set("ambiwidth")',
+ \ 'redraw',
+ \ ], 'Xscript')
+ let buf = RunVimInTerminal('-S Xscript', {})
+ call term_wait(buf)
+ call term_sendkeys(buf, "S\<C-R>=&ambiwidth\<CR>\<Esc>")
+ call WaitForAssert({-> assert_match('single', term_getline(buf, 1))})
+
+ call StopVimInTerminal(buf)
+ call delete('Xscript')
+endfunc
diff --git a/src/version.c b/src/version.c
index 81fc685..9b2e81b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -795,6 +795,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 387,
+/**/
386,
/**/
385,