[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [1/2] cmd/tests: Add FOR /D tests (try 2)
From:       Octavian Voicu <octavian.voicu () gmail ! com>
Date:       2011-07-30 7:01:37
Message-ID: CAM0=5GusvLEY4AqHxNSy6yTw3k0VfGO+gbUKBXzthUAUejF_=g () mail ! gmail ! com
[Download RAW message or body]

2011/7/29 Frédéric Delanoy <frederic.delanoy@gmail.com>:
> On Fri, Jul 29, 2011 at 22:05, Octavian Voicu <octavian.voicu@gmail.com> wrote:
>> I believe you can also use this syntax [put for instruction in
>> parentheses, add | sort at the end]:
>> (for ... ...) | sort
>
> Yeah, but as usual, when NT4 enters in the dance... you get the
> picture... doesn't support the same set of arguments as later
> versions...
> Sorting is of course a very recent problem ;)
>
> BTW I quickly tested your stuff, but I get a list of "prompt>echo ..."

It works for me, but it does seem it has some problems. It seems cmd
doesn't terminate the pipe nicely and sort throws an ugly error after
cmd exits. It also kind of freezes after the command if you run it
interactive. Cmd doesn't play nicely with non-windows executables, or
the piping stuff is not properly implemented.

$ ls
bar  baz  foo  x.cmd
$ wine cmd /c x.cmd

Z:\home\octav\x>(for /d %i in (*) do echo %i) | Z:\usr\bin\sort
foo
bar
baz
$ Z:\usr\bin\sort: read failed: -: Input/output error

>> Btw, it's a horrible hack, but until you'll have a wine sort you can
>> test with (for ... ...) | Z:\usr\bin\sort :)
>
> I'm sure AJ would appreciate that a lot ;)

I wasn't even remotely suggesting committing such an atrocity! It was
just to make sure the commented tests you commit are OK, but I guess
you can also use native sort.exe. Come to think of it, if you add
Z:\usr\bin to PATH it should work even better...

Octavian



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic