summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-01-19 20:45:27 +0100
committerLennart Poettering <lennart@poettering.net>2015-01-20 15:06:58 +0100
commita2e0337875addaf08225fbf9b231435ba12a88b5 (patch)
tree2d8db845ca71eef64593bc564931d9f21fc1fe9b /src/test
parent6c8f2e7d78b1fe280588dc91beae90cdf36fcd49 (diff)
util: make http url validity checks more generic, and move them to util.c
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-util.c18
1 files changed, 9 insertions, 9 deletions
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) {