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