Hi,

2013/06/18 Tue 9:03:02 UTC+9 Taro MURAOKA wrote:
> There are tests failed on DOS/Windows environment.
> I have fixed two of them.

I have fixed another two of them.

test71: (fix-test71.patch)
* The 'fileformat' of test71.in is unix, but dotest.in executes ':set ff&'.
  This makes :bwipe failure. It should be :bwipe!.
* 'encoding' should be latin1.
  (I don't know why test71 doesn't fail on Unix without this setting.)


test17: (fix-test17.patch)
* mkdir on Windows doesn't support an option -p.
* 'rm -rf' cannot be used on Windows without installing Unix tools.
* The result of ':checkpath!' is different. Need to replace "\" to "/".
* Some of ':e' should be ':e!' because 'fileformat' can be changed.

Actually the last STARTTEST..ENDTEST block in the test17 still fails after
applying fix-test17.patch. Here is the result:

29c29,33
<   bar.c^M^@  NOT FOUND
---
>   Xdir1/dir2/bar.c
>   Xdir1/dir2/bar.c -->
>     Xdir1/dir2/baz.c
>     Xdir1/dir2/baz.c -->
>       foo.c^@  (Already listed)

The difference of 'fileformat' seems to cause the result.
This can be fixed by applying additional-fix-test17.patch,
but I don't think this is the right solution.
Is this behavior intended?

Best regards,
Ken Takata

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent cd99314e5594ca43394de1d3f2498bd6e08ac53d
diff --git a/src/testdir/test71.in b/src/testdir/test71.in
--- a/src/testdir/test71.in
+++ b/src/testdir/test71.in
@@ -2,13 +2,14 @@
 
 STARTTEST
 :so small.vim
+:set enc=latin1
 :/^start of text/+1
 :let text_lines = getline('.', line('.') + 2)
 :/^start of cm=zip bytes/+1
 :let cm0_bytes = getline('.', '.')
 :/^start of cm=blowfish bytes/+1
 :let cm1_bytes = getline('.', '.')
-:bwipe
+:bwipe!
 :call append(0, text_lines)
 :$d
 :X
# HG changeset patch
# Parent 5212123bc6731bd9b37e5382bd6641bdb8ec9ed4

diff --git a/src/testdir/test17.in b/src/testdir/test17.in
--- a/src/testdir/test17.in
+++ b/src/testdir/test17.in
@@ -9,6 +9,13 @@
 :else
 : set isfname=@,48-57,/,.,-,_,+,,,$,:,~,{,}
 :endif
+:function! DeleteDirectory(dir)
+: if has("win16") || has("win32") || has("win64") || has("dos16") || has("dos32")
+:  exec "silent !rmdir /Q /S " . a:dir
+: else
+:  exec "silent !rm -rf " . a:dir
+: endif
+:endfun
 :if has("unix")
 :let $CDIR = "."
 /CDIR
@@ -20,6 +27,11 @@
 :endif
 /TDIR
 :endif
+:" Dummy writing for making that sure gf doesn't fail even if the current
+:" file is modified. It can be occurred when executing the following command
+:" directly on Windows without fixing the 'fileformat':
+:"  > nmake -f Make_dos.mak test17.out
+:w! test.out
 gf
 :w! test.out
 :brewind
@@ -31,10 +43,11 @@
 STARTTEST
 :" check for 'include' without \zs or \ze
 :lang C
-:!rm -f ./Xbase.a
-:!rm -rf ./Xdir1
-:!mkdir -p Xdir1/dir2
-:e Xdir1/dir2/foo.a
+:call delete("./Xbase.a")
+:call DeleteDirectory("Xdir1")
+:!mkdir Xdir1
+:!mkdir "Xdir1/dir2"
+:e! Xdir1/dir2/foo.a
 i#include   "bar.a"
 :w
 :e Xdir1/dir2/bar.a
@@ -55,15 +68,16 @@
 
 STARTTEST
 :" check for 'include' with \zs and \ze
-:!rm -f ./Xbase.b
-:!rm -rf ./Xdir1
-:!mkdir -p Xdir1/dir2
+:call delete("./Xbase.b")
+:call DeleteDirectory("Xdir1")
+:!mkdir Xdir1
+:!mkdir "Xdir1/dir2"
 :let &include='^\s*%inc\s*/\zs[^/]\+\ze'
 :function! DotsToSlashes()
 :  return substitute(v:fname, '\.', '/', 'g') . '.b'
 :endfunction
 :let &includeexpr='DotsToSlashes()'
-:e Xdir1/dir2/foo.b
+:e! Xdir1/dir2/foo.b
 i%inc   /bar/
 :w
 :e Xdir1/dir2/bar.b
@@ -84,9 +98,10 @@
 
 STARTTEST
 :" check for 'include' with \zs and no \ze
-:!rm -f ./Xbase.c
-:!rm -rf ./Xdir1
-:!mkdir -p Xdir1/dir2
+:call delete("./Xbase.c")
+:call DeleteDirectory("Xdir1")
+:!mkdir Xdir1
+:!mkdir "Xdir1/dir2"
 :let &include='^\s*%inc\s*\%([[:upper:]][^[:space:]]*\s\+\)\?\zs\S\+\ze'
 :function! StripNewlineChar()
 :  if v:fname =~ '\n$'
@@ -95,7 +110,7 @@
 :  return v:fname
 :endfunction
 :let &includeexpr='StripNewlineChar()'
-:e Xdir1/dir2/foo.c
+:e! Xdir1/dir2/foo.c
 i%inc   bar.c
 :w
 :e Xdir1/dir2/bar.c
@@ -115,6 +130,10 @@
 :checkpath!
 :redir END
 :brewind
+:" replace "\" to "/" for Windows
+:e test.out
+:%s#\\#/#g
+:w
 :q
 ENDTEST
 
# HG changeset patch
# Parent a13a5ff3d5e9e1543522eea4ddec8edcb4bc4639
diff --git a/src/testdir/test17.in b/src/testdir/test17.in
--- a/src/testdir/test17.in
+++ b/src/testdir/test17.in
@@ -111,19 +111,24 @@
 :endfunction
 :let &includeexpr='StripNewlineChar()'
 :e! Xdir1/dir2/foo.c
+:set ff=unix
 i%inc   bar.c
 :w
 :e Xdir1/dir2/bar.c
+:set ff=unix
 i%inc      baz.c
 :w
 :e Xdir1/dir2/baz.c
+:set ff=unix
 i%inc            foo.c
 :w
 :e Xdir1/dir2/FALSE.c
+:set ff=unix
 i%inc            foo.c
 :w
 :e Xbase.c
 :set path=Xdir1/dir2
+:set ff=unix
 i%inc    FALSE.c foo.c
 :w
 :redir! >>test.out

Raspunde prin e-mail lui