Nazri Ramliy wrote: > On Mon, Aug 9, 2010 at 2:59 AM, Bram Moolenaar <b...@moolenaar.net> wrote: > > > > James Vega wrote: > > > >> When running tests in my build environment, I noticed that test73 kept > >> failing while it would work fine in my normal environment. Turns out > >> this is because my build environment uses dash[0] for /bin/sh, which > >> doesn't support ** wildcards (since they're not specified by POSIX). > >> > >> Poking around, I see that unix_expandpath handles ** regardless of shell > >> by doing its own expansion. Would it make sense to use unix_expandpath > >> to handle the ** when mch_expand_wildcards needs STYLE_VIMGLOB ('shell' > >> is "sh") or STYLE_ECHO (unknown shell)? > > > > When it gets to STYLE_VIMGLOB or STYLE_ECHO this means the shell must be > > used to expand wildcards. Trying unix_expandpath() should already have > > happened. That's because using the shell is a last resort, as it's > > quite slow. > > > > I don't see the sequence of calls that would lead to this. Perhaps it > > depends on some setting? > > I stumbled into this problem (works fine in my environment, but fails in > /bin/dash) when I first attempted to write test73. > > At that point the find completion was implemented differently when on > windows (using mch_expandpath()) than when on unix (using globpath()) > and it still contained the buggy 'recursive = TRUE' stuff, which is now > fixed in changeset 7ec9ada2cd81. > > I could not reproduce the problem that you are reporting with the latest > vim (changeset 06a44c4eb3e5 "Prepare for 7.3e release"). > > I can reproduce the problem with the following bug-ridden-patch: > > -- >8 -- > diff --git a/src/misc1.c b/src/misc1.c > index 13b413c..02a8163 100644 > --- a/src/misc1.c > +++ b/src/misc1.c > @@ -9753,9 +9753,9 @@ gen_expand_wildcards(num_pat, pat, num_file, file, > flags) > || flags & > EW_CDPATH)) > { > /* recursiveness is OK here */ > - recursive = FALSE; > + //recursive = FALSE; > add_pat = expand_in_path(&ga, p, flags); > - recursive = TRUE; > + //recursive = TRUE; > } > else > #endif > -- 8< -- > > James, maybe you are running the test with an outdated vim?
The test is passing for me on all platforms, except for a Vim build with DJGPP. I haven't yet looked into why this happens. Nazri, can you build Vim with DJGPP? The compiler can be downloaded for free. -- Now it is such a bizarrely improbable coincidence that anything as mind-bogglingly useful as the Babel fish could have evolved purely by chance that some thinkers have chosen to see it as a final and clinching proof of the NON-existence of God. The argument goes something like this: 'I refuse to prove that I exist,' says God, 'for proof denies faith, and without faith I am nothing.' 'But,' says Man, 'the Babel fish is a dead giveaway, isn't it? It could not have evolved by chance. It proves you exist, and so therefore, by your own arguments, you don't. QED.' 'Oh dear,' says God, 'I hadn't thought of that,' and promptly vanishes in a puff of logic. 'Oh, that was easy,' says Man, and for an encore goes on to prove that black is white and gets himself killed on the next pedestrian crossing. -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- 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