aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJason Woodward2012-01-08 10:18:33 +0000
committerJason Woodward2012-01-08 11:51:52 +0000
commitafebb536b69bb7040bee5fc93f84dfeec1bbe904 (patch)
tree0a7304021576b77f504633679952d59407c053a2 /t
parent4ce0ecf5eb98fbb574b956e9c95ace7859edc39b (diff)
downloadslapt-get-afebb536b69bb7040bee5fc93f84dfeec1bbe904.tar.gz
strip whitespace from url before parsing
Diffstat (limited to 't')
-rw-r--r--t/test_configuration.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/test_configuration.c b/t/test_configuration.c
index 5e233a1..8d4f9f0 100644
--- a/t/test_configuration.c
+++ b/t/test_configuration.c
@@ -84,6 +84,18 @@ START_TEST (test_source_list)
}
END_TEST
+START_TEST (test_source_trimming)
+{
+ slapt_source_t *src1 = slapt_init_source("http://www.test.org/dist ");
+ slapt_source_t *src2 = slapt_init_source("http://www.test.org/dist:PREFERRED ");
+
+ fail_if ( strcmp (src1->url,"http://www.test.org/dist/") != 0);
+ fail_if ( strcmp (src2->url,"http://www.test.org/dist/") != 0);
+
+ slapt_free_source(src1);
+ slapt_free_source(src2);
+}
+END_TEST
@@ -96,6 +108,7 @@ Suite *configuration_test_suite()
tcase_add_test (tc, test_working_dir);
tcase_add_test (tc, test_exclude_list);
tcase_add_test (tc, test_source_list);
+ tcase_add_test (tc, test_source_trimming);
suite_add_tcase (s, tc);
return s;