Frédéric Delanoy : cmd/tests: Add ^ escape character tests.

Alexandre Julliard julliard at winehq.org
Mon Jul 25 11:43:14 CDT 2011


Module: wine
Branch: master
Commit: 1e28bbb88ebef47dadced18c8cadc83afc381d27
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1e28bbb88ebef47dadced18c8cadc83afc381d27

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Sat Jul 23 20:13:50 2011 +0200

cmd/tests: Add ^ escape character tests.

---

 programs/cmd/tests/test_builtins.cmd     |   36 +++++++++++++++++++++++++++++-
 programs/cmd/tests/test_builtins.cmd.exp |   21 ++++++++++++++++-
 2 files changed, 55 insertions(+), 2 deletions(-)

diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index d94c3e7..8e2539c 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -28,8 +28,42 @@ echo .word
 echo word at space@
 echo word at space@@space@
 
-echo ------------ Testing 'set' --------------
+echo ------------ Testing ^^ escape character --------------
+rem Using something like "echo foo^" asks for an additional char after a "More?" prompt on the following line; it's not possible to currently test that non-interactively
+echo ^hell^o, world
+echo hell^o, world
+echo hell^^o, world
+echo hell^^^o, world
+mkdir foobar
+echo baz> foobar\baz
+type foobar\baz
+type foobar^\baz
+rd /s/q foobar
+echo foo ^| echo bar
+echo foo ^& echo bar
+call :setError 0
+echo bak ^&& echo baz 2> nul
 echo %ErrorLevel%
+echo foo ^> foo
+echo ^<> foo
+type foo
+del foo
+set FOO=oof
+echo ff^%FOO%
+set FOO=bar ^| baz
+set FOO
+rem FIXME: echoing %FOO% gives an error (baz not recognized) but prematurely
+rem exits the script on windows; redirecting stdout and/or stderr doesn't help
+echo %ErrorLevel%
+call :setError 0
+set FOO=bar ^^^| baz
+set FOO
+echo %FOO%
+echo %ErrorLevel%
+set FOO=
+
+echo ------------ Testing 'set' --------------
+call :setError 0
 set FOOBAR 2> nul > nul
 echo %ErrorLevel%
 set FOOBAR =  baz
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 6e842b8..267f83e 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -47,8 +47,27 @@ word
 .word
 word at space@
 word at space@@space@
+ at todo_wine@------------ Testing ^ escape character --------------
+ at todo_wine@hello, world
+ at todo_wine@hello, world
+ at todo_wine@hell^o, world
+ at todo_wine@hell^o, world
+baz
+ at todo_wine@baz
+ at todo_wine@foo | echo bar
+ at todo_wine@foo & echo bar
+ at todo_wine@bak &
+ at todo_wine@baz at space@
+ at todo_wine@0 at or_broken@1
+ at todo_wine@foo > foo
+ at todo_wine@<
+ at todo_wine@ffoof
+ at todo_wine@FOO=bar | baz
+ at todo_wine@0
+ at todo_wine@FOO=bar ^| baz
+ at todo_wine@bar | baz
+ at todo_wine@0
 ------------ Testing 'set' --------------
-0
 1
 @todo_wine at 0
 FOOBAR not defined




More information about the wine-cvs mailing list