Karsten Hopp 55096d
To: vim_dev@googlegroups.com
Karsten Hopp 55096d
Subject: Patch 7.4.370
Karsten Hopp 55096d
Fcc: outbox
Karsten Hopp 55096d
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 55096d
Mime-Version: 1.0
Karsten Hopp 55096d
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 55096d
Content-Transfer-Encoding: 8bit
Karsten Hopp 55096d
------------
Karsten Hopp 55096d
Karsten Hopp 55096d
Patch 7.4.370
Karsten Hopp 55096d
Problem:    Linebreak test fails when encoding is not utf-8. (Danek Duvall)
Karsten Hopp 55096d
Solution:   Split the test in a single byte one and a utf-8 one. (Christian
Karsten Hopp 55096d
	    Brabandt)
Karsten Hopp 55096d
Files:	    src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
Karsten Hopp 55096d
	    src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
Karsten Hopp 55096d
	    src/testdir/Make_vms.mms, src/testdir/Makefile,
Karsten Hopp 55096d
	    src/testdir/test_listlbr.in, src/testdir/test_listlbr.ok,
Karsten Hopp 55096d
	    src/testdir/test_listlbr_utf8.in, src/testdir/test_listlbr_utf8.ok
Karsten Hopp 55096d
Karsten Hopp 55096d
Karsten Hopp 55096d
*** ../vim-7.4.369/src/testdir/Make_amiga.mak	2014-07-02 19:59:35.454375136 +0200
Karsten Hopp 55096d
--- src/testdir/Make_amiga.mak	2014-07-16 16:55:15.311578352 +0200
Karsten Hopp 55096d
***************
Karsten Hopp 55096d
*** 39,44 ****
Karsten Hopp 55096d
--- 39,45 ----
Karsten Hopp 55096d
  		test_autoformat_join.out \
Karsten Hopp 55096d
  		test_breakindent.out \
Karsten Hopp 55096d
  		test_listlbr.out \
Karsten Hopp 55096d
+ 		test_listlbr_utf8.out \
Karsten Hopp 55096d
  		test_eval.out \
Karsten Hopp 55096d
  		test_options.out
Karsten Hopp 55096d
  
Karsten Hopp 55096d
***************
Karsten Hopp 55096d
*** 167,171 ****
Karsten Hopp 55096d
--- 168,173 ----
Karsten Hopp 55096d
  test_autoformat_join.out: test_autoformat_join.in
Karsten Hopp 55096d
  test_breakindent.out: test_breakindent.in
Karsten Hopp 55096d
  test_listlbr.out: test_listlbr.in
Karsten Hopp 55096d
+ test_listlbr_utf8.out: test_listlbr_utf8.in
Karsten Hopp 55096d
  test_eval.out: test_eval.in
Karsten Hopp 55096d
  test_options.out: test_options.in
Karsten Hopp 55096d
*** ../vim-7.4.369/src/testdir/Make_dos.mak	2014-07-16 14:20:38.255766903 +0200
Karsten Hopp 55096d
--- src/testdir/Make_dos.mak	2014-07-16 16:56:02.423577394 +0200
Karsten Hopp 55096d
***************
Karsten Hopp 55096d
*** 38,43 ****
Karsten Hopp 55096d
--- 38,44 ----
Karsten Hopp 55096d
  		test_autoformat_join.out \
Karsten Hopp 55096d
  		test_breakindent.out \
Karsten Hopp 55096d
  		test_listlbr.out \
Karsten Hopp 55096d
+ 		test_listlbr_utf8.out \
Karsten Hopp 55096d
  		test_eval.out \
Karsten Hopp 55096d
  		test_options.out
Karsten Hopp 55096d
  
Karsten Hopp 55096d
*** ../vim-7.4.369/src/testdir/Make_ming.mak	2014-07-02 19:59:35.454375136 +0200
Karsten Hopp 55096d
--- src/testdir/Make_ming.mak	2014-07-16 16:55:15.311578352 +0200
Karsten Hopp 55096d
***************
Karsten Hopp 55096d
*** 58,63 ****
Karsten Hopp 55096d
--- 58,64 ----
Karsten Hopp 55096d
  		test_autoformat_join.out \
Karsten Hopp 55096d
  		test_breakindent.out \
Karsten Hopp 55096d
  		test_listlbr.out \
Karsten Hopp 55096d
+ 		test_listlbr_utf8.out \
Karsten Hopp 55096d
  		test_eval.out \
Karsten Hopp 55096d
  		test_options.out
Karsten Hopp 55096d
  
Karsten Hopp 55096d
*** ../vim-7.4.369/src/testdir/Make_os2.mak	2014-07-02 19:59:35.454375136 +0200
Karsten Hopp 55096d
--- src/testdir/Make_os2.mak	2014-07-16 16:55:15.311578352 +0200
Karsten Hopp 55096d
***************
Karsten Hopp 55096d
*** 40,45 ****
Karsten Hopp 55096d
--- 40,46 ----
Karsten Hopp 55096d
  		test_autoformat_join.out \
Karsten Hopp 55096d
  		test_eval.out \
Karsten Hopp 55096d
  		test_breakindent.out \
Karsten Hopp 55096d
+ 		test_listlbr_utf8.out \
Karsten Hopp 55096d
  		test_listlbr.out \
Karsten Hopp 55096d
  		test_options.out
Karsten Hopp 55096d
  
Karsten Hopp 55096d
*** ../vim-7.4.369/src/testdir/Make_vms.mms	2014-07-02 19:59:35.454375136 +0200
Karsten Hopp 55096d
--- src/testdir/Make_vms.mms	2014-07-16 16:55:15.311578352 +0200
Karsten Hopp 55096d
***************
Karsten Hopp 55096d
*** 99,104 ****
Karsten Hopp 55096d
--- 99,105 ----
Karsten Hopp 55096d
  	 test_autoformat_join.out \
Karsten Hopp 55096d
  	 test_breakindent.out \
Karsten Hopp 55096d
  	 test_listlbr.out \
Karsten Hopp 55096d
+ 	 test_listlbr_utf8.out \
Karsten Hopp 55096d
  	 test_eval.out \
Karsten Hopp 55096d
  	 test_options.out
Karsten Hopp 55096d
  
Karsten Hopp 55096d
*** ../vim-7.4.369/src/testdir/Makefile	2014-07-02 19:59:35.454375136 +0200
Karsten Hopp 55096d
--- src/testdir/Makefile	2014-07-16 16:55:15.311578352 +0200
Karsten Hopp 55096d
***************
Karsten Hopp 55096d
*** 36,41 ****
Karsten Hopp 55096d
--- 36,42 ----
Karsten Hopp 55096d
  		test_autoformat_join.out \
Karsten Hopp 55096d
  		test_breakindent.out \
Karsten Hopp 55096d
  		test_listlbr.out \
Karsten Hopp 55096d
+ 		test_listlbr_utf8.out \
Karsten Hopp 55096d
  		test_eval.out \
Karsten Hopp 55096d
  		test_options.out
Karsten Hopp 55096d
  
Karsten Hopp 55096d
*** ../vim-7.4.369/src/testdir/test_listlbr.in	2014-07-02 19:59:35.454375136 +0200
Karsten Hopp 55096d
--- src/testdir/test_listlbr.in	2014-07-16 16:55:15.311578352 +0200
Karsten Hopp 55096d
***************
Karsten Hopp 55096d
*** 1,10 ****
Karsten Hopp 55096d
! Test for linebreak and list option
Karsten Hopp 55096d
  
Karsten Hopp 55096d
  STARTTEST
Karsten Hopp 55096d
  :so small.vim
Karsten Hopp 55096d
  :if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif
Karsten Hopp 55096d
  :10new|:vsp|:vert resize 20
Karsten Hopp 55096d
! :put =\"\tabcdef hijklmn\tpqrstuvwxyz\u00a01060ABCDEFGHIJKLMNOP \"
Karsten Hopp 55096d
  :norm! zt
Karsten Hopp 55096d
  :set ts=4 sw=4 sts=4 linebreak sbr=+ wrap
Karsten Hopp 55096d
  :fu! ScreenChar(width)
Karsten Hopp 55096d
--- 1,10 ----
Karsten Hopp 55096d
! Test for linebreak and list option (non-utf8)
Karsten Hopp 55096d
  
Karsten Hopp 55096d
  STARTTEST
Karsten Hopp 55096d
  :so small.vim
Karsten Hopp 55096d
  :if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif
Karsten Hopp 55096d
  :10new|:vsp|:vert resize 20
Karsten Hopp 55096d
! :put =\"\tabcdef hijklmn\tpqrstuvwxyz_1060ABCDEFGHIJKLMNOP \"
Karsten Hopp 55096d
  :norm! zt
Karsten Hopp 55096d
  :set ts=4 sw=4 sts=4 linebreak sbr=+ wrap
Karsten Hopp 55096d
  :fu! ScreenChar(width)
Karsten Hopp 55096d
***************
Karsten Hopp 55096d
*** 32,53 ****
Karsten Hopp 55096d
  :redraw!
Karsten Hopp 55096d
  :let line=ScreenChar(winwidth(0))
Karsten Hopp 55096d
  :call DoRecordScreen()
Karsten Hopp 55096d
! :let g:test ="Test 3: set linebreak + set list + fancy listchars"
Karsten Hopp 55096d
! :exe "set linebreak list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6"
Karsten Hopp 55096d
! :redraw!
Karsten Hopp 55096d
! :let line=ScreenChar(winwidth(0))
Karsten Hopp 55096d
! :call DoRecordScreen()
Karsten Hopp 55096d
! :let g:test ="Test 4: set linebreak nolist"
Karsten Hopp 55096d
  :set nolist linebreak
Karsten Hopp 55096d
  :redraw!
Karsten Hopp 55096d
  :let line=ScreenChar(winwidth(0))
Karsten Hopp 55096d
  :call DoRecordScreen()
Karsten Hopp 55096d
! :let g:test ="Test 5: set nolinebreak list"
Karsten Hopp 55096d
! :set list nolinebreak
Karsten Hopp 55096d
! :redraw!
Karsten Hopp 55096d
! :let line=ScreenChar(winwidth(0))
Karsten Hopp 55096d
! :call DoRecordScreen()
Karsten Hopp 55096d
! :let g:test ="Test 6: set linebreak with tab and 1 line as long as screen: should break!"
Karsten Hopp 55096d
  :set nolist linebreak ts=8
Karsten Hopp 55096d
  :let line="1\t".repeat('a', winwidth(0)-2)
Karsten Hopp 55096d
  :$put =line
Karsten Hopp 55096d
--- 32,43 ----
Karsten Hopp 55096d
  :redraw!
Karsten Hopp 55096d
  :let line=ScreenChar(winwidth(0))
Karsten Hopp 55096d
  :call DoRecordScreen()
Karsten Hopp 55096d
! :let g:test ="Test 3: set linebreak nolist"
Karsten Hopp 55096d
  :set nolist linebreak
Karsten Hopp 55096d
  :redraw!
Karsten Hopp 55096d
  :let line=ScreenChar(winwidth(0))
Karsten Hopp 55096d
  :call DoRecordScreen()
Karsten Hopp 55096d
! :let g:test ="Test 4: set linebreak with tab and 1 line as long as screen: should break!"
Karsten Hopp 55096d
  :set nolist linebreak ts=8
Karsten Hopp 55096d
  :let line="1\t".repeat('a', winwidth(0)-2)
Karsten Hopp 55096d
  :$put =line
Karsten Hopp 55096d
*** ../vim-7.4.369/src/testdir/test_listlbr.ok	2014-07-02 19:59:35.454375136 +0200
Karsten Hopp 55096d
--- src/testdir/test_listlbr.ok	2014-07-16 16:55:15.315578352 +0200
Karsten Hopp 55096d
***************
Karsten Hopp 55096d
*** 1,38 ****
Karsten Hopp 55096d
  
Karsten Hopp 55096d
! 	abcdef hijklmn	pqrstuvwxyz 1060ABCDEFGHIJKLMNOP 
Karsten Hopp 55096d
  
Karsten Hopp 55096d
  Test 1: set linebreak
Karsten Hopp 55096d
      abcdef          
Karsten Hopp 55096d
  +hijklmn            
Karsten Hopp 55096d
! +pqrstuvwxyz 1060ABC
Karsten Hopp 55096d
  +DEFGHIJKLMNOP      
Karsten Hopp 55096d
  
Karsten Hopp 55096d
  Test 2: set linebreak + set list
Karsten Hopp 55096d
  ^Iabcdef hijklmn^I  
Karsten Hopp 55096d
! +pqrstuvwxyz 1060ABC
Karsten Hopp 55096d
  +DEFGHIJKLMNOP      
Karsten Hopp 55096d
                      
Karsten Hopp 55096d
  
Karsten Hopp 55096d
! Test 3: set linebreak + set list + fancy listchars
Karsten Hopp 55096d
! ▕———abcdef          
Karsten Hopp 55096d
! +hijklmn▕———        
Karsten Hopp 55096d
! +pqrstuvwxyz␣1060ABC
Karsten Hopp 55096d
! +DEFGHIJKLMNOPˑ¶    
Karsten Hopp 55096d
! 
Karsten Hopp 55096d
! Test 4: set linebreak nolist
Karsten Hopp 55096d
      abcdef          
Karsten Hopp 55096d
  +hijklmn            
Karsten Hopp 55096d
! +pqrstuvwxyz 1060ABC
Karsten Hopp 55096d
  +DEFGHIJKLMNOP      
Karsten Hopp 55096d
- 
Karsten Hopp 55096d
- Test 5: set nolinebreak list
Karsten Hopp 55096d
- ▕———abcdef hijklmn▕—
Karsten Hopp 55096d
- +pqrstuvwxyz␣1060ABC
Karsten Hopp 55096d
- +DEFGHIJKLMNOPˑ¶    
Karsten Hopp 55096d
- ¶                   
Karsten Hopp 55096d
  1	aaaaaaaaaaaaaaaaaa
Karsten Hopp 55096d
  
Karsten Hopp 55096d
! Test 6: set linebreak with tab and 1 line as long as screen: should break!
Karsten Hopp 55096d
  1                   
Karsten Hopp 55096d
  +aaaaaaaaaaaaaaaaaa 
Karsten Hopp 55096d
  ~                   
Karsten Hopp 55096d
--- 1,26 ----
Karsten Hopp 55096d
  
Karsten Hopp 55096d
! 	abcdef hijklmn	pqrstuvwxyz_1060ABCDEFGHIJKLMNOP 
Karsten Hopp 55096d
  
Karsten Hopp 55096d
  Test 1: set linebreak
Karsten Hopp 55096d
      abcdef          
Karsten Hopp 55096d
  +hijklmn            
Karsten Hopp 55096d
! +pqrstuvwxyz_1060ABC
Karsten Hopp 55096d
  +DEFGHIJKLMNOP      
Karsten Hopp 55096d
  
Karsten Hopp 55096d
  Test 2: set linebreak + set list
Karsten Hopp 55096d
  ^Iabcdef hijklmn^I  
Karsten Hopp 55096d
! +pqrstuvwxyz_1060ABC
Karsten Hopp 55096d
  +DEFGHIJKLMNOP      
Karsten Hopp 55096d
                      
Karsten Hopp 55096d
  
Karsten Hopp 55096d
! Test 3: set linebreak nolist
Karsten Hopp 55096d
      abcdef          
Karsten Hopp 55096d
  +hijklmn            
Karsten Hopp 55096d
! +pqrstuvwxyz_1060ABC
Karsten Hopp 55096d
  +DEFGHIJKLMNOP      
Karsten Hopp 55096d
  1	aaaaaaaaaaaaaaaaaa
Karsten Hopp 55096d
  
Karsten Hopp 55096d
! Test 4: set linebreak with tab and 1 line as long as screen: should break!
Karsten Hopp 55096d
  1                   
Karsten Hopp 55096d
  +aaaaaaaaaaaaaaaaaa 
Karsten Hopp 55096d
  ~                   
Karsten Hopp 55096d
*** ../vim-7.4.369/src/testdir/test_listlbr_utf8.in	2014-07-16 17:01:25.415570829 +0200
Karsten Hopp 55096d
--- src/testdir/test_listlbr_utf8.in	2014-07-16 16:55:15.315578352 +0200
Karsten Hopp 55096d
***************
Karsten Hopp 55096d
*** 0 ****
Karsten Hopp 55096d
--- 1,41 ----
Karsten Hopp 55096d
+ Test for linebreak and list option in utf-8 mode
Karsten Hopp 55096d
+ 
Karsten Hopp 55096d
+ STARTTEST
Karsten Hopp 55096d
+ :so small.vim
Karsten Hopp 55096d
+ :if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif
Karsten Hopp 55096d
+ :so mbyte.vim
Karsten Hopp 55096d
+ :if &enc !=? 'utf-8'|:e! test.ok|:w! test.out|qa!|endif
Karsten Hopp 55096d
+ :10new|:vsp|:vert resize 20
Karsten Hopp 55096d
+ :put =\"\tabcdef hijklmn\tpqrstuvwxyz\u00a01060ABCDEFGHIJKLMNOP \"
Karsten Hopp 55096d
+ :norm! zt
Karsten Hopp 55096d
+ :set ts=4 sw=4 sts=4 linebreak sbr=+ wrap
Karsten Hopp 55096d
+ :fu! ScreenChar(width)
Karsten Hopp 55096d
+ :	let c=''
Karsten Hopp 55096d
+ :	for j in range(1,4)
Karsten Hopp 55096d
+ :	    for i in range(1,a:width)
Karsten Hopp 55096d
+ :	    	let c.=nr2char(screenchar(j, i))
Karsten Hopp 55096d
+ :	    endfor
Karsten Hopp 55096d
+ :           let c.="\n"
Karsten Hopp 55096d
+ :	endfor
Karsten Hopp 55096d
+ :	return c
Karsten Hopp 55096d
+ :endfu
Karsten Hopp 55096d
+ :fu! DoRecordScreen()
Karsten Hopp 55096d
+ :	wincmd l
Karsten Hopp 55096d
+ :	$put =printf(\"\n%s\", g:test)
Karsten Hopp 55096d
+ :	$put =g:line
Karsten Hopp 55096d
+ :	wincmd p
Karsten Hopp 55096d
+ :endfu
Karsten Hopp 55096d
+ :let g:test ="Test 1: set linebreak + set list + fancy listchars"
Karsten Hopp 55096d
+ :exe "set linebreak list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6"
Karsten Hopp 55096d
+ :redraw!
Karsten Hopp 55096d
+ :let line=ScreenChar(winwidth(0))
Karsten Hopp 55096d
+ :call DoRecordScreen()
Karsten Hopp 55096d
+ :let g:test ="Test 2: set nolinebreak list"
Karsten Hopp 55096d
+ :set list nolinebreak
Karsten Hopp 55096d
+ :redraw!
Karsten Hopp 55096d
+ :let line=ScreenChar(winwidth(0))
Karsten Hopp 55096d
+ :call DoRecordScreen()
Karsten Hopp 55096d
+ :%w! test.out
Karsten Hopp 55096d
+ :qa!
Karsten Hopp 55096d
+ ENDTEST
Karsten Hopp 55096d
+ dummy text
Karsten Hopp 55096d
*** ../vim-7.4.369/src/testdir/test_listlbr_utf8.ok	2014-07-16 17:01:25.419570829 +0200
Karsten Hopp 55096d
--- src/testdir/test_listlbr_utf8.ok	2014-07-16 16:55:15.315578352 +0200
Karsten Hopp 55096d
***************
Karsten Hopp 55096d
*** 0 ****
Karsten Hopp 55096d
--- 1,14 ----
Karsten Hopp 55096d
+ 
Karsten Hopp 55096d
+ 	abcdef hijklmn	pqrstuvwxyz 1060ABCDEFGHIJKLMNOP 
Karsten Hopp 55096d
+ 
Karsten Hopp 55096d
+ Test 1: set linebreak + set list + fancy listchars
Karsten Hopp 55096d
+ ▕———abcdef          
Karsten Hopp 55096d
+ +hijklmn▕———        
Karsten Hopp 55096d
+ +pqrstuvwxyz␣1060ABC
Karsten Hopp 55096d
+ +DEFGHIJKLMNOPˑ¶    
Karsten Hopp 55096d
+ 
Karsten Hopp 55096d
+ Test 2: set nolinebreak list
Karsten Hopp 55096d
+ ▕———abcdef hijklmn▕—
Karsten Hopp 55096d
+ +pqrstuvwxyz␣1060ABC
Karsten Hopp 55096d
+ +DEFGHIJKLMNOPˑ¶    
Karsten Hopp 55096d
+ ¶                   
Karsten Hopp 55096d
*** ../vim-7.4.369/src/version.c	2014-07-16 16:30:21.647608710 +0200
Karsten Hopp 55096d
--- src/version.c	2014-07-16 16:56:38.755576656 +0200
Karsten Hopp 55096d
***************
Karsten Hopp 55096d
*** 736,737 ****
Karsten Hopp 55096d
--- 736,739 ----
Karsten Hopp 55096d
  {   /* Add new patch number below this line */
Karsten Hopp 55096d
+ /**/
Karsten Hopp 55096d
+     370,
Karsten Hopp 55096d
  /**/
Karsten Hopp 55096d
Karsten Hopp 55096d
-- 
Karsten Hopp 55096d
   Another bucket of what can only be described as human ordure hits ARTHUR.
Karsten Hopp 55096d
ARTHUR: ... Right!  (to the KNIGHTS) That settles it!
Karsten Hopp 55096d
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp 55096d
Karsten Hopp 55096d
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 55096d
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 55096d
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 55096d
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///