]> granicus.if.org Git - vim/commitdiff
patch 8.1.1956: screenshot tests may use a different encoding v8.1.1956
authorBram Moolenaar <Bram@vim.org>
Sun, 1 Sep 2019 13:26:23 +0000 (15:26 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 1 Sep 2019 13:26:23 +0000 (15:26 +0200)
Problem:    Screenshot tests may use a different encoding. (Dominique Pelle)
Solution:   Always set 'encoding' to "utf-8" when running Vim in a terminal.
            (closes #4884)

src/testdir/dumps/Test_popupwin_behind.dump
src/testdir/shared.vim
src/testdir/test_popupwin.vim
src/version.c

index 1fa8615f30eb9dfd97f6b3d8787cf32f542100f4..cec0a5259bf762fc9ea894382c9d31ea0c53e575 100644 (file)
@@ -7,4 +7,4 @@
 |~+0#4040ff13&| @34|l+0#0000001#ffd7ff255|i|n|e|4| +0#4040ff13#ffffff0@33
 |~| @73
 |[+1#0000000&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1
-|A+0&&|l|r|e|a|d|y| |o|n|l|y| |o|n|e| |w|i|n|d|o|w| @51
+| +0&&@74
index 1032b45a35bcb980f40bcaf98a4f7c15e11e4b9f..cf15a4cc4150024d1ebf189ba466f60b16842745 100644 (file)
@@ -278,6 +278,9 @@ func GetVimCommandClean()
   let cmd = substitute(cmd, '-u NONE', '--clean', '')
   let cmd = substitute(cmd, '--not-a-term', '', '')
 
+  " Force using utf-8, Vim may pick up something else from the environment.
+  let cmd ..= ' --cmd "set enc=utf8" '
+
   " Optionally run Vim under valgrind
   " let cmd = 'valgrind --tool=memcheck --leak-check=yes --num-callers=25 --log-file=valgrind ' . cmd
 
index 16e451929083f1a488ae1303e7de816dc2a80e4f..a6d4d622bc2c85df10177ba20905d5feacb92a94 100644 (file)
@@ -1378,7 +1378,6 @@ func Test_popup_never_behind()
   " |                             |
   " +-----------------------------+
   let lines =<< trim END
-    only 
     split
     vsplit
     let info_window1 = getwininfo()[0]
@@ -1649,11 +1648,12 @@ func Test_notifications()
   CheckFeature timers
   CheckScreendump
 
-  call writefile([
-       \ "call setline(1, range(1, 20))",
-       \ "hi Notification ctermbg=lightblue",
-       \ "call popup_notification('first notification', {})",
-       \], 'XtestNotifications')
+  let lines =<< trim END
+       call setline(1, range(1, 20))
+       hi Notification ctermbg=lightblue
+       call popup_notification('first notification', {})
+  END
+  call writefile(lines, 'XtestNotifications')
   let buf = RunVimInTerminal('-S XtestNotifications', #{rows: 10})
   call VerifyScreenDump(buf, 'Test_popupwin_notify_01', {})
 
index afde7b6bc738e7bb3443715e1a2be0d95184d7a0..5c29e3c77aa105620fb774208c0e06ce03ae0043 100644 (file)
@@ -761,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1956,
 /**/
     1955,
 /**/