[vlc-commits] vlc_credential: update test
Thomas Guillem
git at videolan.org
Mon Feb 29 11:56:53 CET 2016
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Feb 29 11:40:53 2016 +0100| [2ab554b1f20fa5b2a2be07ec8b863a651f1b8af3] | committer: Thomas Guillem
vlc_credential: update test
Call vlc_credential_store even if credential is not valid.
Test an invalid path and an invalid url.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2ab554b1f20fa5b2a2be07ec8b863a651f1b8af3
---
test/src/misc/keystore.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/test/src/misc/keystore.c b/test/src/misc/keystore.c
index e52c3d7..c90a403 100644
--- a/test/src/misc/keystore.c
+++ b/test/src/misc/keystore.c
@@ -189,6 +189,14 @@ static const struct testcase
{ false, SMB("user6;wrong_domain at host/share/path1/ks_find"),
{ "user6", "pwd6" }, {}, {}, false },
+
+ WIPE_MEMORY_KEYSTORE,
+
+ { false, "://invalid_url", NULL, NULL,
+ { "user1", "pwd1" }, {}, { "user1", "pwd1" }, false },
+
+ { false, "/invalid_path", NULL, NULL,
+ { "user1", "pwd1" }, {}, { "user1", "pwd1" }, false },
};
static void
@@ -248,7 +256,6 @@ test(vlc_object_t *p_obj, unsigned int i_id, const struct testcase *p_test)
vlc_url_t url;
vlc_UrlParse(&url, p_test->psz_url);
- assert(url.psz_protocol != NULL && url.psz_host != NULL);
vlc_credential credential;
vlc_credential_init(&credential, &url);
@@ -263,11 +270,11 @@ test(vlc_object_t *p_obj, unsigned int i_id, const struct testcase *p_test)
&& strcmp(credential.psz_password, p_test->result.psz_pwd) == 0)
{
b_found = true;
- vlc_credential_store(&credential, p_obj);
break;
}
}
assert(b_found == p_test->b_found);
+ vlc_credential_store(&credential, p_obj);
vlc_UrlClean(&url);
vlc_credential_clean(&credential);
More information about the vlc-commits
mailing list