Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
47d4041d
Commit
47d4041d
authored
Oct 16, 2012
by
Francois Gouget
Committed by
Alexandre Julliard
Oct 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Fix a test_argify() check that fails on NT4 and Windows 2000.
parent
82c1fb41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
shlexec.c
dlls/shell32/tests/shlexec.c
+18
-8
No files found.
dlls/shell32/tests/shlexec.c
View file @
47d4041d
...
...
@@ -704,7 +704,7 @@ static int StrCmpPath(const char* s1, const char* s2)
return
0
;
}
static
void
_okChildString
(
const
char
*
file
,
int
line
,
const
char
*
key
,
const
char
*
expected
)
static
void
_okChildString
(
const
char
*
file
,
int
line
,
const
char
*
key
,
const
char
*
expected
,
const
char
*
bad
)
{
char
*
result
;
result
=
getChildString
(
"Arguments"
,
key
);
...
...
@@ -713,7 +713,8 @@ static void _okChildString(const char* file, int line, const char* key, const ch
ok_
(
file
,
line
)(
FALSE
,
"%s expected '%s', but key not found or empty
\n
"
,
key
,
expected
);
return
;
}
ok_
(
file
,
line
)(
lstrcmpiA
(
result
,
expected
)
==
0
,
ok_
(
file
,
line
)(
lstrcmpiA
(
result
,
expected
)
==
0
||
broken
(
lstrcmpiA
(
result
,
bad
)
==
0
),
"%s expected '%s', got '%s'
\n
"
,
key
,
expected
,
result
);
}
...
...
@@ -738,7 +739,8 @@ static void _okChildInt(const char* file, int line, const char* key, int expecte
"%s expected %d, but got %d
\n
"
,
key
,
expected
,
result
);
}
#define okChildString(key, expected) _okChildString(__FILE__, __LINE__, (key), (expected))
#define okChildString(key, expected) _okChildString(__FILE__, __LINE__, (key), (expected), (expected))
#define okChildStringBroken(key, expected, broken) _okChildString(__FILE__, __LINE__, (key), (expected), (broken))
#define okChildPath(key, expected) _okChildPath(__FILE__, __LINE__, (key), (expected))
#define okChildInt(key, expected) _okChildInt(__FILE__, __LINE__, (key), (expected))
...
...
@@ -1219,6 +1221,7 @@ typedef struct
const
char
*
params
;
int
todo
;
cmdline_tests_t
cmd
;
cmdline_tests_t
broken
;
}
argify_tests_t
;
static
const
argify_tests_t
argify_tests
[]
=
...
...
@@ -1324,7 +1327,9 @@ static const argify_tests_t argify_tests[] =
/* An unclosed quoted string gets lost! */
{
"Params23456"
,
"p2
\"
p3
\"
\"
p4 is lost"
,
0x1c3
,
{
"
\"
p2
\"
\"
p3
\"
\"\"
\"\"
\"\"
"
,
{
""
,
"p2"
,
"p3"
,
""
,
""
,
""
,
NULL
},
0
}},
{
""
,
"p2"
,
"p3"
,
""
,
""
,
""
,
NULL
},
0
},
{
"
\"
p2
\"
\"
p3
\"
\"
p3
\"
\"\"
\"\"
"
,
{
""
,
"p2"
,
"p3"
,
"p3"
,
""
,
""
,
NULL
},
0
}},
/* Backslashes have no special meaning even when preceding quotes. All
* they do is start an unquoted string.
...
...
@@ -1376,6 +1381,7 @@ static void test_argify(void)
char
fileA
[
MAX_PATH
],
params
[
2
*
MAX_PATH
+
12
];
INT_PTR
rc
;
const
argify_tests_t
*
test
;
const
cmdline_tests_t
*
bad
;
const
char
*
cmd
;
unsigned
i
,
count
;
...
...
@@ -1392,6 +1398,8 @@ static void test_argify(void)
test
=
argify_tests
;
while
(
test
->
params
)
{
bad
=
test
->
broken
.
cmd
?
&
test
->
broken
:
&
test
->
cmd
;
/* trace("***** verb='%s' params='%s'\n", test->verb, test->params); */
rc
=
shell_execute_ex
(
SEE_MASK_DOENVSUBST
,
test
->
verb
,
fileA
,
test
->
params
,
NULL
,
NULL
);
ok
(
rc
>
32
,
"%s failed: rc=%lu
\n
"
,
shell_call
,
rc
);
...
...
@@ -1415,18 +1423,20 @@ static void test_argify(void)
if
(
cmd
)
cmd
+=
strlen
(
test
->
verb
);
if
(
!
cmd
)
cmd
=
"(null)"
;
if
((
test
->
todo
&
0x2
)
==
0
)
ok
(
!
strcmp
(
cmd
,
test
->
cmd
.
cmd
),
"%s: the cmdline is '%s' instead of '%s'
\n
"
,
shell_call
,
cmd
,
test
->
cmd
.
cmd
);
ok
(
!
strcmp
(
cmd
,
test
->
cmd
.
cmd
)
||
broken
(
!
strcmp
(
cmd
,
bad
->
cmd
)),
"%s: the cmdline is '%s' instead of '%s'
\n
"
,
shell_call
,
cmd
,
test
->
cmd
.
cmd
);
else
todo_wine
ok
(
!
strcmp
(
cmd
,
test
->
cmd
.
cmd
),
"%s: the cmdline is '%s' instead of '%s'
\n
"
,
shell_call
,
cmd
,
test
->
cmd
.
cmd
);
ok
(
!
strcmp
(
cmd
,
test
->
cmd
.
cmd
)
||
broken
(
!
strcmp
(
cmd
,
bad
->
cmd
)),
"%s: the cmdline is '%s' instead of '%s'
\n
"
,
shell_call
,
cmd
,
test
->
cmd
.
cmd
);
for
(
i
=
0
;
i
<
count
-
1
;
i
++
)
{
char
argname
[
18
];
sprintf
(
argname
,
"argvA%d"
,
4
+
i
);
if
((
test
->
todo
&
(
1
<<
(
i
+
4
)))
==
0
)
okChildString
(
argname
,
test
->
cmd
.
args
[
i
+
1
]);
okChildString
Broken
(
argname
,
test
->
cmd
.
args
[
i
+
1
],
bad
->
args
[
i
+
1
]);
else
todo_wine
okChildString
(
argname
,
test
->
cmd
.
args
[
i
+
1
]);
okChildString
Broken
(
argname
,
test
->
cmd
.
args
[
i
+
1
],
bad
->
args
[
i
+
1
]);
}
if
(
has_cl2a
)
...
...
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