Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
libsoup
Commits
2939e11e
Commit
2939e11e
authored
Nov 15, 2022
by
Amanda
Browse files
cookie: Test for: Fix soup_cookie_equal() with NULL path
parent
c5081115
Pipeline
#462479
passed with stages
in 9 minutes and 36 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/cookies-test.c
View file @
2939e11e
...
...
@@ -367,6 +367,20 @@ do_cookies_parsing_nopath_nullorigin (void)
soup_cookie_free
(
cookie
);
}
static
void
do_cookies_equal_nullpath
(
void
)
{
SoupCookie
*
cookie1
,
*
cookie2
;
cookie1
=
soup_cookie_new
(
"one"
,
"1"
,
"127.0.0.1"
,
NULL
,
1000
);
cookie2
=
soup_cookie_new
(
"two"
,
"1"
,
"127.0.0.1"
,
NULL
,
1000
);
g_assert_false
(
soup_cookie_equal
(
cookie1
,
cookie2
));
soup_cookie_free
(
cookie1
);
soup_cookie_free
(
cookie2
);
}
static
void
do_get_cookies_empty_host_test
(
void
)
{
...
...
@@ -526,6 +540,7 @@ main (int argc, char **argv)
g_test_add_func
(
"/cookies/accept-policy-subdomains"
,
do_cookies_subdomain_policy_test
);
g_test_add_func
(
"/cookies/parsing"
,
do_cookies_parsing_test
);
g_test_add_func
(
"/cookies/parsing/no-path-null-origin"
,
do_cookies_parsing_nopath_nullorigin
);
g_test_add_func
(
"/cookies/parsing/equal-nullpath"
,
do_cookies_equal_nullpath
);
g_test_add_func
(
"/cookies/get-cookies/empty-host"
,
do_get_cookies_empty_host_test
);
g_test_add_func
(
"/cookies/remove-feature"
,
do_remove_feature_test
);
g_test_add_func
(
"/cookies/secure-cookies"
,
do_cookies_strict_secure_test
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment