073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.529
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.529
073263
Problem:    No test for what 7.4.517 fixes.
073263
Solution:   Adjust the tests for breakindent. (Christian Brabandt)
073263
Files:	    src/testdir/test_breakindent.in, src/testdir/test_breakindent.ok
073263
073263
073263
*** ../vim-7.4.528/src/testdir/test_breakindent.in	2014-08-24 21:39:45.488526954 +0200
073263
--- src/testdir/test_breakindent.in	2014-11-27 14:04:39.349335102 +0100
073263
***************
073263
*** 6,23 ****
073263
  :10new|:vsp|:vert resize 20
073263
  :put =\"\tabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP\"
073263
  :set ts=4 sw=4 sts=4 breakindent
073263
! :fu! ScreenChar(width)
073263
  :	let c=''
073263
  :	for i in range(1,a:width)
073263
! :		let c.=nr2char(screenchar(line('.'), i))
073263
  :	endfor
073263
  :       let c.="\n"
073263
  :	for i in range(1,a:width)
073263
! :		let c.=nr2char(screenchar(line('.')+1, i))
073263
  :	endfor
073263
  :       let c.="\n"
073263
  :	for i in range(1,a:width)
073263
! :		let c.=nr2char(screenchar(line('.')+2, i))
073263
  :	endfor
073263
  :	return c
073263
  :endfu
073263
--- 6,23 ----
073263
  :10new|:vsp|:vert resize 20
073263
  :put =\"\tabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP\"
073263
  :set ts=4 sw=4 sts=4 breakindent
073263
! :fu! ScreenChar(line, width)
073263
  :	let c=''
073263
  :	for i in range(1,a:width)
073263
! :		let c.=nr2char(screenchar(a:line, i))
073263
  :	endfor
073263
  :       let c.="\n"
073263
  :	for i in range(1,a:width)
073263
! :		let c.=nr2char(screenchar(a:line+1, i))
073263
  :	endfor
073263
  :       let c.="\n"
073263
  :	for i in range(1,a:width)
073263
! :		let c.=nr2char(screenchar(a:line+2, i))
073263
  :	endfor
073263
  :	return c
073263
  :endfu
073263
***************
073263
*** 29,71 ****
073263
  :endfu
073263
  :set briopt=min:0
073263
  :let g:test="Test 1: Simple breakindent"
073263
! :let line1=ScreenChar(8)
073263
  :call DoRecordScreen()
073263
  :let g:test="Test 2: Simple breakindent + sbr=>>"
073263
  :set sbr=>>
073263
! :let line1=ScreenChar(8)
073263
  :call DoRecordScreen()
073263
  :let g:test ="Test 3: Simple breakindent + briopt:sbr"
073263
  :set briopt=sbr,min:0 sbr=++
073263
! :let line1=ScreenChar(8)
073263
  :call DoRecordScreen()
073263
  :let g:test ="Test 4: Simple breakindent + min width: 18"
073263
  :set sbr= briopt=min:18
073263
! :let line1=ScreenChar(8)
073263
  :call DoRecordScreen()
073263
  :let g:test =" Test 5: Simple breakindent + shift by 2"
073263
  :set briopt=shift:2,min:0
073263
! :let line1=ScreenChar(8)
073263
  :call DoRecordScreen()
073263
  :let g:test=" Test 6: Simple breakindent + shift by -1"
073263
  :set briopt=shift:-1,min:0
073263
! :let line1=ScreenChar(8)
073263
  :call DoRecordScreen()
073263
  :let g:test=" Test 7: breakindent + shift by +1 + nu + sbr=? briopt:sbr"
073263
  :set briopt=shift:1,sbr,min:0 nu sbr=? nuw=4
073263
! :let line1=ScreenChar(10)
073263
  :call DoRecordScreen()
073263
  :let g:test=" Test 8: breakindent + shift:1 + nu + sbr=# list briopt:sbr"
073263
  :set briopt=shift:1,sbr,min:0 nu sbr=# list
073263
! :let line1=ScreenChar(10)
073263
  :call DoRecordScreen()
073263
  :let g:test=" Test 9: breakindent + shift by +1 + 'nu' + sbr=# list"
073263
  :set briopt-=sbr
073263
! :let line1=ScreenChar(10)
073263
  :call DoRecordScreen()
073263
  :let g:test=" Test 10: breakindent + shift by +1 + 'nu' + sbr=~ cpo+=n"
073263
  :set cpo+=n sbr=~ nu nuw=4 nolist briopt=sbr,min:0
073263
! :let line1=ScreenChar(10)
073263
  :call DoRecordScreen()
073263
  :wincmd p
073263
  :let g:test="\n Test 11: strdisplaywidth when breakindent is on"
073263
--- 29,71 ----
073263
  :endfu
073263
  :set briopt=min:0
073263
  :let g:test="Test 1: Simple breakindent"
073263
! :let line1=ScreenChar(line('.'),8)
073263
  :call DoRecordScreen()
073263
  :let g:test="Test 2: Simple breakindent + sbr=>>"
073263
  :set sbr=>>
073263
! :let line1=ScreenChar(line('.'),8)
073263
  :call DoRecordScreen()
073263
  :let g:test ="Test 3: Simple breakindent + briopt:sbr"
073263
  :set briopt=sbr,min:0 sbr=++
073263
! :let line1=ScreenChar(line('.'),8)
073263
  :call DoRecordScreen()
073263
  :let g:test ="Test 4: Simple breakindent + min width: 18"
073263
  :set sbr= briopt=min:18
073263
! :let line1=ScreenChar(line('.'),8)
073263
  :call DoRecordScreen()
073263
  :let g:test =" Test 5: Simple breakindent + shift by 2"
073263
  :set briopt=shift:2,min:0
073263
! :let line1=ScreenChar(line('.'),8)
073263
  :call DoRecordScreen()
073263
  :let g:test=" Test 6: Simple breakindent + shift by -1"
073263
  :set briopt=shift:-1,min:0
073263
! :let line1=ScreenChar(line('.'),8)
073263
  :call DoRecordScreen()
073263
  :let g:test=" Test 7: breakindent + shift by +1 + nu + sbr=? briopt:sbr"
073263
  :set briopt=shift:1,sbr,min:0 nu sbr=? nuw=4
073263
! :let line1=ScreenChar(line('.'),10)
073263
  :call DoRecordScreen()
073263
  :let g:test=" Test 8: breakindent + shift:1 + nu + sbr=# list briopt:sbr"
073263
  :set briopt=shift:1,sbr,min:0 nu sbr=# list
073263
! :let line1=ScreenChar(line('.'),10)
073263
  :call DoRecordScreen()
073263
  :let g:test=" Test 9: breakindent + shift by +1 + 'nu' + sbr=# list"
073263
  :set briopt-=sbr
073263
! :let line1=ScreenChar(line('.'),10)
073263
  :call DoRecordScreen()
073263
  :let g:test=" Test 10: breakindent + shift by +1 + 'nu' + sbr=~ cpo+=n"
073263
  :set cpo+=n sbr=~ nu nuw=4 nolist briopt=sbr,min:0
073263
! :let line1=ScreenChar(line('.'),10)
073263
  :call DoRecordScreen()
073263
  :wincmd p
073263
  :let g:test="\n Test 11: strdisplaywidth when breakindent is on"
073263
***************
073263
*** 74,79 ****
073263
--- 74,87 ----
073263
  :let width = strlen(text[1:])+indent(2)*4+strlen(&sbr)*3 " text wraps 3 times
073263
  :$put =g:test
073263
  :$put =printf(\"strdisplaywidth: %d == calculated: %d\", strdisplaywidth(text), width)
073263
+ :let g:str="\t\t\t\t\t{"
073263
+ :let g:test=" Test 12: breakindent + long indent"
073263
+ :wincmd p
073263
+ :set all& breakindent linebreak briopt=min:10 nu numberwidth=3 ts=4
073263
+ :$put =g:str
073263
+ zt:let line1=ScreenChar(1,10)
073263
+ :wincmd p
073263
+ :call DoRecordScreen()
073263
  :"
073263
  :" Test, that the string "    a\tb\tc\td\te" is correctly
073263
  :" displayed in a 20 column wide window (see bug report
073263
***************
073263
*** 87,93 ****
073263
  :?^\s*z
073263
  fygjyl:let line2 = @0
073263
  :quit!
073263
! :$put ='Test 12: breakindent with wrapping Tab'
073263
  :$put =line1
073263
  :$put =line2
073263
  :"
073263
--- 95,101 ----
073263
  :?^\s*z
073263
  fygjyl:let line2 = @0
073263
  :quit!
073263
! :$put ='Test 13: breakindent with wrapping Tab'
073263
  :$put =line1
073263
  :$put =line2
073263
  :"
073263
*** ../vim-7.4.528/src/testdir/test_breakindent.ok	2014-08-24 21:19:22.220571318 +0200
073263
--- src/testdir/test_breakindent.ok	2014-11-27 14:04:39.349335102 +0100
073263
***************
073263
*** 53,58 ****
073263
  
073263
   Test 11: strdisplaywidth when breakindent is on
073263
  strdisplaywidth: 46 == calculated: 64
073263
! Test 12: breakindent with wrapping Tab
073263
  d
073263
  w
073263
--- 53,64 ----
073263
  
073263
   Test 11: strdisplaywidth when breakindent is on
073263
  strdisplaywidth: 46 == calculated: 64
073263
! 					{
073263
! 
073263
!  Test 12: breakindent + long indent
073263
! 56        
073263
!           
073263
! ~         
073263
! Test 13: breakindent with wrapping Tab
073263
  d
073263
  w
073263
*** ../vim-7.4.528/src/version.c	2014-11-27 13:37:07.403539956 +0100
073263
--- src/version.c	2014-11-27 14:05:44.240619187 +0100
073263
***************
073263
*** 743,744 ****
073263
--- 743,746 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     529,
073263
  /**/
073263
073263
-- 
073263
(letter from Mark to Mike, about the film's probable certificate)
073263
      I would like to get back to the Censor and agree to lose the shits, take
073263
      the odd Jesus Christ out and lose Oh fuck off, but to retain 'fart in
073263
      your general direction', 'castanets of your testicles' and 'oral sex'
073263
      and ask him for an 'A' rating on that basis.
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    ///