From: Haidong Yu <yuhaidong(a)uniontech.com> Signed-off-by: Haidong Yu <yuhaidong(a)uniontech.com> --- programs/cmd/tests/test_cmdline.cmd | 51 ++++++++++++++++++++++++- programs/cmd/tests/test_cmdline.cmd.exp | 16 ++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) diff --git a/programs/cmd/tests/test_cmdline.cmd b/programs/cmd/tests/test_cmdline.cmd index 8712f05f87d..23584e952fc 100644 --- a/programs/cmd/tests/test_cmdline.cmd +++ b/programs/cmd/tests/test_cmdline.cmd @@ -240,6 +240,55 @@ call say' echo @echo ~ > "say~.bat" call say~ +echo --------- Testing batch with keywords filename -------------- +echo @echo start > start.bat +echo start.bat > test.bat +call test.bat + +echo @echo for > for.bat +echo for.bat > test.bat +call test.bat + +echo @echo more > more.bat +echo more.bat > test.bat +call test.bat + +echo @echo . > echo.bat +echo echo.bat bar > test.bat +call test.bat +del echo.bat +echo.bat + +echo @echo . > .bat +echo .bat > test.bat +call test.bat + +echo @echo echo+ > echo+.bat +echo echo+.bat > test.bat +call test.bat +echo echo+ bar> test.bat +call test.bat +del echo+.bat +call test.bat + +echo @echo echo_ > echo_.bat +echo echo_.bat > test.bat +call test.bat +echo echo_ bar > test.bat +call test.bat + +echo @echo + > +.bat +echo +.bat > test.bat +call test.bat +echo + > test.bat +call test.bat + +echo @echo _ > _.bat +echo _.bat > test.bat +call test.bat +echo _ > test.bat +call test.bat + echo --------- Testing parameter passing -------------- echo @echo 1:%%1,2:%%2 > tell.bat call tell 1 @@ -278,7 +327,7 @@ call tell(1234) call tell(12(34) call tell(12;34) echo --------- Finished -------------- -del tell.bat say*.* bazbaz*.bat +del tell.bat say*.* bazbaz*.bat start.bat test.bat for.bat more.bat echo.bat .bat echo+.bat echo_.bat +.bat _.bat exit :setError exit /B %1 diff --git a/programs/cmd/tests/test_cmdline.cmd.exp b/programs/cmd/tests/test_cmdline.cmd.exp index 946e353fcf3..b8b344c9b1f 100644 --- a/programs/cmd/tests/test_cmdline.cmd.exp +++ b/programs/cmd/tests/test_cmdline.cmd.exp @@ -121,6 +121,22 @@ bar(a)space@ 0(a)space@ '@space@ ~@space@ +--------- Testing batch with keywords filename -------------- +start(a)space@ +for(a)space@ +more(a)space@ +.(a)space@ +bat(a)space@ +.(a)space@ +echo+(a)space@ +echo+(a)space@ +(a)space@bar(a)space@ +echo_(a)space@ +echo_(a)space@ ++(a)space@ ++(a)space@ +_(a)space@ +_(a)space@ --------- Testing parameter passing -------------- 1:1,2:@space@ 1:(1),2:@space@ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5242