Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
3ce59f5d
Commit
3ce59f5d
authored
Aug 24, 2011
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Aug 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/tests: Add attrib tests.
parent
ca8c23f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
0 deletions
+81
-0
test_builtins.cmd
programs/cmd/tests/test_builtins.cmd
+61
-0
test_builtins.cmd.exp
programs/cmd/tests/test_builtins.cmd.exp
+20
-0
No files found.
programs/cmd/tests/test_builtins.cmd
View file @
3ce59f5d
...
@@ -786,6 +786,67 @@ if not exist bar\baz (echo bar\baz removed) else echo bar\baz not removed!
...
@@ -786,6 +786,67 @@ if not exist bar\baz (echo bar\baz removed) else echo bar\baz not removed!
cd ..
cd ..
rd /s/q foobaz
rd /s/q foobaz
echo ------------ Testing attrib --------------
rem FIXME Add tests for archive, hidden and system attributes + mixed attributes modifications
mkdir foobar & cd foobar
echo foo original contents> foo
attrib foo
echo > bar
echo ... read-only attribute
rem Read-only files cannot be altered or deleted, unless forced
attrib +R foo
attrib foo
dir /Ar /B
echo bar>> foo
type foo
del foo > NUL 2>&1
if exist foo (
echo Read-only file not deleted
) else (
echo Should not delete read-only file!
)
del /F foo
if not exist foo (
echo Read-only file forcibly deleted
) else (
echo Should delete read-only file with del /F!
attrib -r foo
del foo
)
cd ..
rd /s/q foobar
echo ... recursive behaviour
mkdir foobar\baz & cd foobar
echo > level1
echo > whatever
echo > baz\level2
attrib baz\level2
cd ..
attrib +R l*vel? /S > nul 2>&1
cd foobar
attrib level1
attrib baz\level2
echo > bar
attrib bar
cd ..
rd /s/q foobar
echo ... folders processing
mkdir foobar
attrib foobar
cd foobar
mkdir baz
echo toto> baz\toto
attrib +r baz /s /d > nul 2>&1
attrib baz
attrib baz\toto
echo lulu>>baz\toto
type baz\toto
echo > baz\lala
rem Oddly windows allows file creation in a read-only directory...
if exist baz\lala (echo file created in read-only dir) else echo file not created
cd ..
rd /s/q foobar
echo ------------ Testing CALL --------------
echo ------------ Testing CALL --------------
mkdir foobar & cd foobar
mkdir foobar & cd foobar
rem External script
rem External script
...
...
programs/cmd/tests/test_builtins.cmd.exp
View file @
3ce59f5d
...
@@ -476,6 +476,26 @@ foo removed
...
@@ -476,6 +476,26 @@ foo removed
bar removed
bar removed
foobar removed
foobar removed
bar\baz removed
bar\baz removed
------------ Testing attrib --------------
@todo_wine@A @pwd@\foobar\foo@or_broken@A @pwd@\foobar\foo
... read-only attribute
@todo_wine@A R @pwd@\foobar\foo@or_broken@A R @pwd@\foobar\foo
foo
foo original contents
Read-only file not deleted
Read-only file forcibly deleted
... recursive behaviour
@todo_wine@A @pwd@\foobar\baz\level2@or_broken@A @pwd@\foobar\baz\level2
@todo_wine@A R @pwd@\foobar\level1@or_broken@A R @pwd@\foobar\level1
@todo_wine@A R @pwd@\foobar\baz\level2@or_broken@A R @pwd@\foobar\baz\level2
@todo_wine@A @pwd@\foobar\bar@or_broken@A @pwd@\foobar\bar
... folders processing
@todo_wine@ @pwd@\foobar@or_broken@ @pwd@\foobar
@todo_wine@ R @pwd@\foobar\baz@or_broken@ R @pwd@\foobar\baz@or_broken@ @pwd@\foobar\baz
@todo_wine@A @pwd@\foobar\baz\toto@or_broken@A @pwd@\foobar\baz\toto
toto
lulu
file created in read-only dir
------------ Testing CALL --------------
------------ Testing CALL --------------
foo@space@
foo@space@
@todo_wine@foo 8
@todo_wine@foo 8
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment