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
fec1ed45
Commit
fec1ed45
authored
May 15, 2014
by
Huw Davies
Committed by
Alexandre Julliard
May 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet/tests: Don't test GetLastError() on success.
parent
c5b19d4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
24 deletions
+0
-24
url.c
dlls/wininet/tests/url.c
+0
-24
No files found.
dlls/wininet/tests/url.c
View file @
fec1ed45
...
...
@@ -851,12 +851,9 @@ static void InternetCreateUrlA_test(void)
/* alloc-ed szUrl, NULL lpszScheme
* shows that it uses nScheme instead
*/
SetLastError
(
0xdeadbeef
);
urlComp
.
lpszScheme
=
NULL
;
ret
=
InternetCreateUrlA
(
&
urlComp
,
0
,
szUrl
,
&
len
);
ok
(
ret
,
"Expected success
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
len
==
50
,
"Expected len 50, got %d
\n
"
,
len
);
ok
(
!
strcmp
(
szUrl
,
CREATE_URL1
),
"Expected %s, got %s
\n
"
,
CREATE_URL1
,
szUrl
);
...
...
@@ -864,48 +861,36 @@ static void InternetCreateUrlA_test(void)
* any nScheme out of range seems ignored
*/
fill_url_components
(
&
urlComp
);
SetLastError
(
0xdeadbeef
);
urlComp
.
nScheme
=
-
3
;
len
++
;
ret
=
InternetCreateUrlA
(
&
urlComp
,
0
,
szUrl
,
&
len
);
ok
(
ret
,
"Expected success
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
len
==
50
,
"Expected len 50, got %d
\n
"
,
len
);
/* test valid lpUrlComponents, alloc-ed szUrl */
fill_url_components
(
&
urlComp
);
SetLastError
(
0xdeadbeef
);
len
=
51
;
ret
=
InternetCreateUrlA
(
&
urlComp
,
0
,
szUrl
,
&
len
);
ok
(
ret
,
"Expected success
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
len
==
50
,
"Expected len 50, got %d
\n
"
,
len
);
ok
(
strstr
(
szUrl
,
"80"
)
==
NULL
,
"Didn't expect to find 80 in szUrl
\n
"
);
ok
(
!
strcmp
(
szUrl
,
CREATE_URL1
),
"Expected %s, got %s
\n
"
,
CREATE_URL1
,
szUrl
);
/* valid username, NULL password */
fill_url_components
(
&
urlComp
);
SetLastError
(
0xdeadbeef
);
urlComp
.
lpszPassword
=
NULL
;
len
=
42
;
ret
=
InternetCreateUrlA
(
&
urlComp
,
0
,
szUrl
,
&
len
);
ok
(
ret
,
"Expected success
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
len
==
41
,
"Expected len 41, got %d
\n
"
,
len
);
ok
(
!
strcmp
(
szUrl
,
CREATE_URL2
),
"Expected %s, got %s
\n
"
,
CREATE_URL2
,
szUrl
);
/* valid username, empty password */
fill_url_components
(
&
urlComp
);
SetLastError
(
0xdeadbeef
);
urlComp
.
lpszPassword
=
empty
;
len
=
51
;
ret
=
InternetCreateUrlA
(
&
urlComp
,
0
,
szUrl
,
&
len
);
ok
(
ret
,
"Expected success
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
len
==
50
,
"Expected len 50, got %d
\n
"
,
len
);
ok
(
!
strcmp
(
szUrl
,
CREATE_URL3
),
"Expected %s, got %s
\n
"
,
CREATE_URL3
,
szUrl
);
...
...
@@ -927,39 +912,30 @@ static void InternetCreateUrlA_test(void)
* if password is provided, username has to exist
*/
fill_url_components
(
&
urlComp
);
SetLastError
(
0xdeadbeef
);
urlComp
.
lpszUserName
=
empty
;
len
=
51
;
ret
=
InternetCreateUrlA
(
&
urlComp
,
0
,
szUrl
,
&
len
);
ok
(
ret
,
"Expected success
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
len
==
50
,
"Expected len 50, got %d
\n
"
,
len
);
ok
(
!
strcmp
(
szUrl
,
CREATE_URL5
),
"Expected %s, got %s
\n
"
,
CREATE_URL5
,
szUrl
);
/* NULL username, NULL password */
fill_url_components
(
&
urlComp
);
SetLastError
(
0xdeadbeef
);
urlComp
.
lpszUserName
=
NULL
;
urlComp
.
lpszPassword
=
NULL
;
len
=
42
;
ret
=
InternetCreateUrlA
(
&
urlComp
,
0
,
szUrl
,
&
len
);
ok
(
ret
,
"Expected success
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
len
==
32
,
"Expected len 32, got %d
\n
"
,
len
);
ok
(
!
strcmp
(
szUrl
,
CREATE_URL4
),
"Expected %s, got %s
\n
"
,
CREATE_URL4
,
szUrl
);
/* empty username, empty password */
fill_url_components
(
&
urlComp
);
SetLastError
(
0xdeadbeef
);
urlComp
.
lpszUserName
=
empty
;
urlComp
.
lpszPassword
=
empty
;
len
=
51
;
ret
=
InternetCreateUrlA
(
&
urlComp
,
0
,
szUrl
,
&
len
);
ok
(
ret
,
"Expected success
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
len
==
50
,
"Expected len 50, got %d
\n
"
,
len
);
ok
(
!
strcmp
(
szUrl
,
CREATE_URL5
),
"Expected %s, got %s
\n
"
,
CREATE_URL5
,
szUrl
);
...
...
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