[1/3] cmd/tests: Add tests for directories RENAMEs (try 2)

Frédéric Delanoy frederic.delanoy at gmail.com
Fri Oct 14 08:37:57 CDT 2011


---
 programs/cmd/tests/test_builtins.cmd     |   15 +++++++++++++++
 programs/cmd/tests/test_builtins.cmd.exp |    3 +++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index 1967e42..b68e697 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -899,6 +899,21 @@ rem no-op
 ren foo foo
 mkdir baz
 ren foo baz\abc
+echo ... rename directories ...
+mkdir rep1
+ren rep1 rep2
+if not exist rep1 (
+    if exist rep2 (
+        echo dir renamed
+    )
+)
+attrib +r rep2
+ren rep2 rep1
+if not exist rep2 (
+    if exist rep1 (
+        echo read-only dir renamed
+    )
+)
 echo ... rename in other directory ...
 if not exist baz\abc (
     echo rename impossible in other directory
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index e45016c..5371246 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -601,6 +601,9 @@ bar renamed to foo
 ... name collision ...
 foo
 bar
+... rename directories ...
+dir renamed
+read-only dir renamed
 ... rename in other directory ...
 @todo_wine at rename impossible in other directory
 @todo_wine at original file still present
-- 
1.7.7




More information about the wine-patches mailing list