From a2e0337875addaf08225fbf9b231435ba12a88b5 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 19 Jan 2015 20:45:27 +0100 Subject: util: make http url validity checks more generic, and move them to util.c --- src/test/test-util.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/test') diff --git a/src/test/test-util.c b/src/test/test-util.c index 0c0d2f67f8..8471d310b2 100644 --- a/src/test/test-util.c +++ b/src/test/test-util.c @@ -918,15 +918,15 @@ static void test_files_same(void) { } static void test_is_valid_documentation_url(void) { - assert_se(is_valid_documentation_url("http://www.freedesktop.org/wiki/Software/systemd")); - assert_se(is_valid_documentation_url("https://www.kernel.org/doc/Documentation/binfmt_misc.txt")); - assert_se(is_valid_documentation_url("file:foo")); - assert_se(is_valid_documentation_url("man:systemd.special(7)")); - assert_se(is_valid_documentation_url("info:bar")); - - assert_se(!is_valid_documentation_url("foo:")); - assert_se(!is_valid_documentation_url("info:")); - assert_se(!is_valid_documentation_url("")); + assert_se(documentation_url_is_valid("http://www.freedesktop.org/wiki/Software/systemd")); + assert_se(documentation_url_is_valid("https://www.kernel.org/doc/Documentation/binfmt_misc.txt")); + assert_se(documentation_url_is_valid("file:/foo/foo")); + assert_se(documentation_url_is_valid("man:systemd.special(7)")); + assert_se(documentation_url_is_valid("info:bar")); + + assert_se(!documentation_url_is_valid("foo:")); + assert_se(!documentation_url_is_valid("info:")); + assert_se(!documentation_url_is_valid("")); } static void test_file_in_same_dir(void) { -- cgit v1.2.1