Frédéric Delanoy : cmd/tests: Add tests for FOR / F 'eol' option.
Alexandre Julliard
julliard at winehq.org
Fri Aug 26 10:40:49 CDT 2011
Module: wine
Branch: master
Commit: 1755885472f5612dcb8ee544d1ba46d246aae449
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1755885472f5612dcb8ee544d1ba46d246aae449
Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date: Thu Aug 25 23:08:33 2011 +0200
cmd/tests: Add tests for FOR /F 'eol' option.
---
programs/cmd/tests/test_builtins.cmd | 8 ++++++++
programs/cmd/tests/test_builtins.cmd.exp | 6 ++++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index 4123d4c..af3b52e 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -631,6 +631,14 @@ rem preliminary grep-like program implementation (e.g. like findstr or fc) even
rem for a simple todo_wine test
rem (for /f "usebackq" %%i in (`echo z a b`) do echo %%i) || echo not supported
rem (for /f usebackq %%i in (`echo z a b`) do echo %%i) || echo not supported
+echo ......eol option
+for /f "eol=@" %%i in (" ad") do echo %%i
+for /f "eol=@" %%i in (" z at y") do echo %%i
+for /f "eol=|" %%i in ("a|d") do echo %%i
+for /f "eol=@" %%i in ("@y") do echo %%i > output_file
+if not exist output_file (echo no output) else (del output_file)
+for /f "eol==" %%i in ("=y") do echo %%i > output_file
+if not exist output_file (echo no output) else (del output_file)
cd ..
rd /s/q foobar
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 8e74c79..3ff7eeb 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -461,6 +461,12 @@ kkk
a
b
c
+......eol option
+ at todo_wine@ad
+ at todo_wine@z at y
+ at todo_wine@a|d
+ at todo_wine@no output
+ at todo_wine@no output
-----------Testing del /a-----------
not-r.test not found after delete, good
r.test found before delete, good
More information about the wine-cvs
mailing list