cpan-authors / IPC-Run

https://metacpan.org/pod/IPC::Run
Other
21 stars 38 forks source link

basic test for spaces and args #147

Open wchristian opened 3 years ago

wchristian commented 3 years ago

This serves as a demonstration for the problems in #143.

As far as i understand IPC::Run and comments as https://github.com/toddr/IPC-Run/pull/143#issuecomment-851759322 , all of the calls below should work on windows, right?

Because right now (as well as with older versions) it looks like only these succeed:

ipctest.bat
.\ipctest.bat
dirnospace\ipctest.bat
D:\cpan\IPC-Run\eg\ipctest.bat
D:\cpan\IPC-Run\eg\dirnospace\ipctest.bat
D:/cpan/IPC-Run/eg/ipctest.bat
D:/cpan/IPC-Run/eg/dirnospace/ipctest.bat

Notable failures:

Interestingly i was unable to reproduce the failure indicated by @stphnlyd in https://github.com/toddr/IPC-Run/pull/143#issuecomment-825792859

Note that i didn't yet consider the actual output of what's being run deeply, this mostly focuses on actually running it and getting basic arg behavior right. TODO: .exe files, .exe files with non-standard arg parsing, maybe more complicated args?

Comment invitation for @nmisch, @haarg, @toddr. (I think mohawk gets pinged automatically.)

run [ $_, "meep marp" ], ">", $out;

for all of

ipctest.bat
ipctest2 space.bat
.\ipctest.bat
./ipctest.bat
.\ipctest2 space.bat
./ipctest2 space.bat
dirnospace\ipctest.bat
dirnospace/ipctest.bat
dirnospace\ipctest2 space.bat
dirnospace/ipctest2 space.bat
dir space\ipctest.bat
dir space/ipctest.bat
dir space\ipctest2 space.bat
dir space/ipctest2 space.bat
D:\cpan\IPC-Run\eg\ipctest.bat
D:\cpan\IPC-Run\eg\ipctest2 space.bat
D:\cpan\IPC-Run\eg\dirnospace\ipctest.bat
D:\cpan\IPC-Run\eg\dirnospace\ipctest2 space.bat
D:\cpan\IPC-Run\eg\dir space\ipctest.bat
D:\cpan\IPC-Run\eg\dir space\ipctest2 space.bat
D:/cpan/IPC-Run/eg/ipctest.bat
D:/cpan/IPC-Run/eg/ipctest2 space.bat
D:/cpan/IPC-Run/eg/dirnospace/ipctest.bat
D:/cpan/IPC-Run/eg/dirnospace/ipctest2 space.bat
D:/cpan/IPC-Run/eg/dir space/ipctest.bat
D:/cpan/IPC-Run/eg/dir space/ipctest2 space.bat
toddr commented 2 years ago

Can you rebase this please?

mohawk2 commented 2 years ago

I like the concept! I do think it would be better to capture all the tested files into a module and generate them in a tempdir, in a similar style to EUMM's https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/blob/master/t/lib/MakeMaker/Test/Setup/XS.pm