diff options
author | Antti Ajanki <antti.ajanki@iki.fi> | 2013-08-07 11:31:05 +0300 |
---|---|---|
committer | Antti Ajanki <antti.ajanki@iki.fi> | 2013-08-07 11:31:05 +0300 |
commit | c8512910a23dfedbc307b4f5eb843f4dce65740f (patch) | |
tree | ccb6c5f6f761de53357d71ec2ed132000bba274f /tests/urlutils_tests.c | |
parent | 54424c04a79dd64865d75e07dce3ba39ccb09a5d (diff) | |
download | vdr-plugin-webvideo-c8512910a23dfedbc307b4f5eb843f4dce65740f.tar.gz vdr-plugin-webvideo-c8512910a23dfedbc307b4f5eb843f4dce65740f.tar.bz2 |
Handle mailto: URLs
Diffstat (limited to 'tests/urlutils_tests.c')
-rw-r--r-- | tests/urlutils_tests.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/urlutils_tests.c b/tests/urlutils_tests.c index da5f9e1..73e76ff 100644 --- a/tests/urlutils_tests.c +++ b/tests/urlutils_tests.c @@ -29,6 +29,13 @@ void test_url_scheme_invalid_characters() { g_free(prefix); } +void test_url_scheme_mailto() { + gchar *prefix = url_scheme("mailto:john.doe@example.com"); + g_assert(prefix); + g_assert(strcmp(prefix, "mailto") == 0); + g_free(prefix); +} + void test_url_root() { gchar *prefix = url_root("http://example.com/"); g_assert(prefix); @@ -225,3 +232,11 @@ void test_url_rel2abs_scheme() { g_assert(strcmp(abs, "http://server.org/path2/file2") == 0); g_free(abs); } + +void test_url_rel2abs_mailto_scheme() { + gchar *abs = relative_url_to_absolute("http://example.com/index.html", + "mailto:john.doe@example.com"); + g_assert(abs); + g_assert(strcmp(abs, "mailto:john.doe@example.com") == 0); + g_free(abs); +} |