summaryrefslogtreecommitdiff
path: root/tests/url/test1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/url/test1.cpp')
-rw-r--r--tests/url/test1.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/url/test1.cpp b/tests/url/test1.cpp
deleted file mode 100644
index 23c7d74..0000000
--- a/tests/url/test1.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-#include "URL.hpp"
-#include "SimpleURLNormalizer.hpp"
-
-#include <iostream>
-#include <string>
-
-using namespace std;
-
-int main( int argc, char *argv[] )
-{
- if( argc != 2 ) {
- cerr << "usage: test1 <url>\n" << endl;
- return 1;
- }
-
- char *urlstring = argv[1];
-
- URLNormalizer *normalizer = new SimpleURLNormalizer( );
- URL url = normalizer->parseUrl( urlstring );
- delete normalizer;
-
- if( url == URL::Null ) {
- cerr << "Illegal URL!" << endl;
- return 1;
- }
-
- cout << "protocol: " << url.protocol( ) << endl
- << "host: " << url.host( ) << endl
- << "port: " << url.port( ) << endl
- << "path: " << url.path( ) << endl
- << "query: " << url.query( ) << endl
- << "fragment: " << url.fragment( ) << endl;
-
- cout << "URL: " << url << endl;
-
- return 0;
-}