Patch 7.4.406

114 views
Skip to first unread message

Bram Moolenaar

unread,
Aug 16, 2014, 11:34:54 AM8/16/14
to vim...@googlegroups.com

Patch 7.4.406
Problem: Test 72 and 100 fail on MS-Windows.
Solution: Set fileformat to unix in the tests. (Taro Muraoka)
Files: src/testdir/test72.in, src/testdir/test100.in


*** ../vim-7.4.405/src/testdir/test72.in 2014-08-10 13:34:59.064785459 +0200
--- src/testdir/test72.in 2014-08-16 17:31:40.426134656 +0200
***************
*** 8,13 ****
--- 8,14 ----
:" Test 'undofile': first a simple one-line change.
:set nocompatible viminfo+=nviminfo visualbell
:set ul=100 undofile nomore
+ :set ff=unix
:e! Xtestfile
ggdGithis is one line :set ul=100
:s/one/ONE/
*** ../vim-7.4.405/src/testdir/test100.in 2014-03-12 18:55:52.104906804 +0100
--- src/testdir/test100.in 2014-08-16 17:32:17.642133306 +0200
***************
*** 18,23 ****
--- 18,24 ----
:call FillBuffer()
:call feedkeys(":earlier 10\n", 't')
:call UndoLevel()
+ :set ff=unix
:%w! test.out
:new two
:0put ='TWO: expecting global undolevels: 5, local undolevels: 2 (first) then 10 (afterwards)'
***************
*** 27,32 ****
--- 28,34 ----
:call UndoLevel()
:setlocal ul=10
:call UndoLevel()
+ :set ff=unix
:%w >> test.out
:wincmd p
:redir >>test.out | echo "global value shouldn't be changed and still be 5!" | echo 'ONE: expecting global undolevels: 5, local undolevels: -123456 (default)'|:setglobal undolevels? | echon ' global' | setlocal undolevels? | echon ' local' |echo "" |redir end
***************
*** 35,40 ****
--- 37,43 ----
:1put ='global value should be changed to 50'
:2put ='THREE: expecting global undolevels: 50, local undolevels: -123456 (default)'
:call UndoLevel()
+ :set ff=unix
:%w >> test.out
:"sleep 10
:"
*** ../vim-7.4.405/src/version.c 2014-08-16 16:28:31.886272055 +0200
--- src/version.c 2014-08-16 17:32:10.130133579 +0200
***************
*** 743,744 ****
--- 743,746 ----
{ /* Add new patch number below this line */
+ /**/
+ 406,
/**/

--
Time is an illusion. Lunchtime doubly so.
-- Ford Prefect, in Douglas Adams'
"The Hitchhiker's Guide to the Galaxy"

/// Bram Moolenaar -- Br...@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 ///

Ken Takata

unread,
Oct 24, 2014, 12:31:22 AM10/24/14
to vim...@googlegroups.com
Hi,

2014/8/17 Sun 0:34:54 UTC+9 Bram Moolenaar wrote:
> Patch 7.4.406
> Problem: Test 72 and 100 fail on MS-Windows.
> Solution: Set fileformat to unix in the tests. (Taro Muraoka)
> Files: src/testdir/test72.in, src/testdir/test100.in

Even after this patch, test72 still sometimes fails (about 5~10%).

E.g.:
https://ci.appveyor.com/project/k-takata/vim-ci/build/72#L805
810 28,31c28,31
811 < bar apr
812 < apr
813 < foo mar
814 < mar
815 ---
816 > bar apr
817 > apr
818 > foo mar
819 > mar

The line endings of test72.out is normally CRLF on Windows, but sometimes
only the last 4 lines become LF. It seems that the following part in the
test72.in causes the problem:

:" With encryption, cryptmethod=blowfish2
:e! Xtestfile
rubbish
:set undofile cm=blowfish2

This part opens the Xtestfile which is encrypted with blowfish with a wrong
key "rubbish". Of cause, the contents of the file are broken, but sometimes
the file might be ended with LF. Then 'fileformat' will be set to unix.
'ff' should be always the default value in test72.

Attached patch fixes this.
# I removed the line ':set ff=unix' because it didn't have an effect.
# After the next line (':e! Xtestfile'), 'ff' is set to the default value.

Regards,
Ken Takata

fix-test72-on-windows.patch

Bram Moolenaar

unread,
Oct 25, 2014, 10:56:53 AM10/25/14
to Ken Takata, vim...@googlegroups.com
Thanks!

--
Q: Why do ducks have flat feet?
A: To stamp out forest fires.

Q: Why do elephants have flat feet?
A: To stamp out flaming ducks.
Reply all
Reply to author
Forward
0 new messages