Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
3ce59f5d
Commit
3ce59f5d
authored
13 years ago
by
Frédéric Delanoy
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
cmd/tests: Add attrib tests.
parent
ca8c23f5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
programs/cmd/tests/test_builtins.cmd
+61
-0
61 additions, 0 deletions
programs/cmd/tests/test_builtins.cmd
programs/cmd/tests/test_builtins.cmd.exp
+20
-0
20 additions, 0 deletions
programs/cmd/tests/test_builtins.cmd.exp
with
81 additions
and
0 deletions
programs/cmd/tests/test_builtins.cmd
+
61
−
0
View file @
3ce59f5d
...
...
@@ -786,6 +786,67 @@ if not exist bar\baz (echo bar\baz removed) else echo bar\baz not removed!
cd
..
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
--------------
mkdir
foobar
&
cd
foobar
rem External script
...
...
This diff is collapsed.
Click to expand it.
programs/cmd/tests/test_builtins.cmd.exp
+
20
−
0
View file @
3ce59f5d
...
...
@@ -476,6 +476,26 @@ foo removed
bar removed
foobar 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 --------------
foo@space@
@todo_wine@foo 8
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment