diff options
Diffstat (limited to 'test/src/test-url.cpp')
-rw-r--r-- | test/src/test-url.cpp | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/test/src/test-url.cpp b/test/src/test-url.cpp index e0f8343..9c4d941 100644 --- a/test/src/test-url.cpp +++ b/test/src/test-url.cpp @@ -82,17 +82,23 @@ int main(int argc, char** argv) { #endif
{
- URL url(argv[0]);
- assert(canResolve(argv[0]));
- assert(canResolve(url.asString()));
-
- URL baseUrl = URL::asBaseURL(url);
- URL exeUrl(exeName);
- exeUrl.toAbsolute(baseUrl);
- assert(canResolve(exeUrl.asString()));
- std::cout << exeUrl.asString() << std::endl;
- exeUrl.download(true);
- assert(exeUrl.getInContent().length() > 0);
+ try {
+
+ URL url(argv[0]);
+ assert(canResolve(argv[0]));
+ assert(canResolve(url.asString()));
+
+ URL baseUrl = URL::asBaseURL(url);
+ URL exeUrl(exeName);
+ exeUrl.toAbsolute(baseUrl);
+ assert(canResolve(exeUrl.asString()));
+ std::cout << exeUrl.asString() << std::endl;
+ exeUrl.download(true);
+ assert(exeUrl.getInContent().length() > 0);
+
+ } catch (Event e) {
+ std::cout << e << std::endl;
+ }
}
{
|