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