Patch 7.4.2086
Problem:    Using the system default encoding makes tests unpredictable.
Solution:   Always use utf-8 or latin1 in the new style tests.  Remove setting
            encoding and scriptencoding where it is not needed.
Files:      src/testdir/runtest.vim, src/testdir/test_channel.vim,
            src/testdir/test_digraph.vim, src/testdir/test_expand_dllpath.vim,
            src/testdir/test_expr_utf8.vim, src/testdir/test_json.vim,
            src/testdir/test_matchadd_conceal_utf8.vim,
            src/testdir/test_regexp_utf8.vim, src/testdir/test_visual.vim,
            src/testdir/test_alot_utf8.vim,


*** ../vim-7.4.2085/src/testdir/runtest.vim     2016-07-12 22:51:05.001427987 
+0200
--- src/testdir/runtest.vim     2016-07-21 20:21:19.746723891 +0200
***************
*** 49,54 ****
--- 49,62 ----
  " This also enables use of line continuation.
  set nocp viminfo+=nviminfo
  
+ " Use utf-8 or latin1 be default, instead of whatever the system default
+ " happens to be.  Individual tests can overrule this at the top of the file.
+ if has('multi_byte')
+   set encoding=utf-8
+ else
+   set encoding=latin1
+ endif
+ 
  " Avoid stopping at the "hit enter" prompt
  set nomore
  
*** ../vim-7.4.2085/src/testdir/test_channel.vim        2016-07-19 
17:25:19.082023340 +0200
--- src/testdir/test_channel.vim        2016-07-21 20:08:38.018458358 +0200
***************
*** 1,5 ****
  " Test for channel functions.
- scriptencoding utf-8
  
  if !has('channel')
    finish
--- 1,4 ----
*** ../vim-7.4.2085/src/testdir/test_digraph.vim        2016-07-21 
10:10:59.250942515 +0200
--- src/testdir/test_digraph.vim        2016-07-21 20:04:26.261011205 +0200
***************
*** 4,12 ****
    finish
  endif
  
- set enc=utf-8
- scriptencoding utf-8
- 
  func! Put_Dig(chars)
    exe "norm! o\<c-k>".a:chars
  endfu
--- 4,9 ----
*** ../vim-7.4.2085/src/testdir/test_expand_dllpath.vim 2016-04-20 
16:19:10.030987632 +0200
--- src/testdir/test_expand_dllpath.vim 2016-07-21 20:04:54.388725999 +0200
***************
*** 1,5 ****
- scriptencoding utf-8
- 
  func s:test_expand_dllpath(optname)
    let $TEST_EXPAND_DLLPATH = '/dllpath/lib' . substitute(a:optname, 
'\zedll$', '.', '')
    execute 'let dllpath_save = &' . a:optname
--- 1,3 ----
*** ../vim-7.4.2085/src/testdir/test_expr_utf8.vim      2016-04-23 
15:30:00.542243189 +0200
--- src/testdir/test_expr_utf8.vim      2016-07-21 20:09:30.649924642 +0200
***************
*** 2,9 ****
  if !has('multi_byte')
    finish
  endif
- set encoding=utf-8
- scriptencoding utf-8
  
  func Test_strgetchar()
    call assert_equal(char2nr('á'), strgetchar('áxb', 0))
--- 2,7 ----
*** ../vim-7.4.2085/src/testdir/test_json.vim   2016-02-28 20:04:05.267475357 
+0100
--- src/testdir/test_json.vim   2016-07-21 20:10:29.909323703 +0200
***************
*** 1,12 ****
  " Test for JSON functions.
  
! " JSON requires using utf-8.  Conversion breaks the asserts, therefore set
! " 'encoding' to utf-8.
  if !has('multi_byte')
    finish
  endif
- set encoding=utf-8
- scriptencoding utf-8
  
  let s:json1 = '"str\"in\\g"'
  let s:var1 = "str\"in\\g"
--- 1,9 ----
  " Test for JSON functions.
  
! " JSON requires using utf-8, because conversion breaks the asserts.
  if !has('multi_byte')
    finish
  endif
  
  let s:json1 = '"str\"in\\g"'
  let s:var1 = "str\"in\\g"
*** ../vim-7.4.2085/src/testdir/test_matchadd_conceal_utf8.vim  2016-04-14 
19:48:54.809601526 +0200
--- src/testdir/test_matchadd_conceal_utf8.vim  2016-07-21 20:10:48.353136667 
+0200
***************
*** 2,9 ****
  if !has('conceal') || !has('multi_byte')
    finish
  endif
- set encoding=utf-8
- scriptencoding utf-8
  
  if !has('gui_running') && has('unix')
    set term=ansi
--- 2,7 ----
*** ../vim-7.4.2085/src/testdir/test_regexp_utf8.vim    2016-04-24 
15:10:58.000089405 +0200
--- src/testdir/test_regexp_utf8.vim    2016-07-21 20:21:06.774856740 +0200
***************
*** 2,9 ****
  if !has('multi_byte')
    finish
  endif
- set encoding=utf-8
- scriptencoding utf-8
  
  func s:equivalence_test()
    let str = "AÀÁÂÃÄÅĀĂĄǍǞǠẢ BḂḆ CÇĆĈĊČ DĎĐḊḎḐ EÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ 
HĤĦḢḦḨ IÌÍÎÏĨĪĬĮİǏỈ JĴ KĶǨḰḴ LĹĻĽĿŁḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎŐƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ 
SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ VṼ WŴẀẂẄẆ XẊẌ YÝŶŸẎỲỶỸ ZŹŻŽƵẐẔ aàáâãäåāăąǎǟǡả bḃḇ 
cçćĉċč dďđḋḏḑ eèéêëēĕėęěẻẽ fḟ gĝğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįǐỉ jĵǰ kķǩḱḵ lĺļľŀłḻ 
mḿṁ nñńņňʼnṅṉ oòóôõöøōŏőơǒǫǭỏ pṕṗ q rŕŗřṙṟ sśŝşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vṽ 
wŵẁẃẅẇẘ xẋẍ yýÿŷẏẙỳỷỹ zźżžƶẑẕ"
--- 2,7 ----
*** ../vim-7.4.2085/src/testdir/test_visual.vim 2016-03-05 17:25:34.791256346 
+0100
--- src/testdir/test_visual.vim 2016-07-21 20:12:18.360223895 +0200
***************
*** 1,9 ****
! " Tests for Visual mode
  if !has('multi_byte')
    finish
  endif
- set encoding=utf-8
- scriptencoding utf-8
  
  if !has('visual')
    finish
--- 1,7 ----
! " Tests for Visual mode.  Uses double-wide character.
  if !has('multi_byte')
    finish
  endif
  
  if !has('visual')
    finish
*** ../vim-7.4.2085/src/testdir/test_alot_utf8.vim      2016-04-14 
19:48:54.805601567 +0200
--- src/testdir/test_alot_utf8.vim      2016-07-21 20:27:49.822730573 +0200
***************
*** 1,7 ****
  " A series of tests that can run in one Vim invocation.
  " This makes testing go faster, since Vim doesn't need to restart.
  
! " These tests use utf8 'encoding'.  Setting 'encoding' is in the individual
  " files, so that they can be run by themselves.
  
  source test_expr_utf8.vim
--- 1,8 ----
  " A series of tests that can run in one Vim invocation.
  " This makes testing go faster, since Vim doesn't need to restart.
  
! " These tests use utf8 'encoding'.  Setting 'encoding' is already done in
! " runtest.vim.  Checking for the multi_byte feature is in the individual
  " files, so that they can be run by themselves.
  
  source test_expr_utf8.vim
*** ../vim-7.4.2085/src/version.c       2016-07-21 10:10:59.250942515 +0200
--- src/version.c       2016-07-21 20:00:59.811104462 +0200
***************
*** 760,761 ****
--- 760,763 ----
  {   /* Add new patch number below this line */
+ /**/
+     2086,
  /**/

-- 
"It's so simple to be wise.  Just think of something stupid to say
and then don't say it."        -- Sam Levenson

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui