vim/7.4.370
2014-07-22 15:42:05 +02:00

317 lines
9.3 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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