summaryrefslogtreecommitdiffstats
path: root/test/urls
Commit message (Collapse)AuthorAgeFilesLines
* tests/urls: Run URL tests under valgrindJeremy Kerr2013-09-263-3/+23
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/log: Cleanup log APIJeremy Kerr2013-09-191-5/+0
| | | | | | | | | | Rather than exposing log internals (through always_flush and set_stream), do all logging init through pb_log_init(). If pb_log_init() hasn't been called, pb_log will drop messages. Also, add a pb_debug() function, specifically for debugging information. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* autotools: Fix make maintainer-cleanGeoff Levand2013-05-291-0/+2
| | | | | | Fixes to make maintainer-clean work properly. Signed-off-by: Geoff Levand <geoff@infradead.org>
* Makefiles: remove -I$(includedir)Jeremy Kerr2013-05-071-1/+0
| | | | | | | | | | | Currently, we include the system include dir in some of our makefiles; this is causing build problems when cross-compiling, as the system include dir may not contain files for the host. The compiler should be searing in the proper system include dir, so just remove the redundant -I. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/url: fix no-scheme URL parsingJeremy Kerr2013-05-062-1/+9
| | | | | | | | | | | | | | | | | | | | | | | We were incorrectly dropping the first strlen("file://") characters from URLs with no scheme: --- test/urls/data/localpath.test 2013-05-02 17:26:48.826359036 +0800 +++ /tmp/tmp.gn4JsWLw5o 2013-05-02 17:26:50.262364613 +0800 @@ -2,6 +2,6 @@ scheme file host (null) port (null) -path /test/path/to/local/file -dir /test/path/to/local/ +path ath/to/local/file +dir ath/to/local/ file file This change fixes the issue by indicating "no scheme found" by a NULL return from pb_url_find_scheme, and hadling it appropriately. We add a testcase too. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* test/url: Add uncommitted data filesJeremy Kerr2013-05-063-0/+21
| | | | | | | Add a couple of data files for test that'd I'd ommitted from an earlier commit. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/url: Add pb_join_urlJeremy Kerr2013-04-292-4/+15
| | | | | | Add a a function to join a string to a base URL Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/url: Move URL-handling code to libJeremy Kerr2013-04-152-5/+2
| | | | | | | We'll need to use the URL handling code in the server, so move it to the lib/ directory. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* test/urls: Fix distcheck breakagesJeremy Kerr2013-04-101-0/+4
| | | | | | | | We need a couple of extra automake variables to get `make distcheck` working. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* test/url: Add http-simple.testJeremy Kerr2013-03-061-0/+7
| | | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* test: Add URL parser test infrastructureJeremy Kerr2013-03-064-0/+121
This change adds some simple testing infrastrcture to the URL parser. We use a small C binary (parse-url) to run the url parser on its argument, and compare the output with an expected datafile. An initial test is included, to check the behaviour of URLs with multiple slashes between host and pathname. This test currently fails. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
OpenPOWER on IntegriCloud