summaryrefslogtreecommitdiff
path: root/src/tests/url.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-03-30 22:33:41 +0000
committerMike Buland <eichlan@xagasoft.com>2011-03-30 22:33:41 +0000
commit4b9289cfb260f4bcecaf23a810584ef6ef8e8501 (patch)
tree79136af08c7e42ba3322f0d73e9779e4354b318a /src/tests/url.cpp
parentc7636dc954eddfe58f7959392602fbc9072d77e7 (diff)
downloadlibbu++-4b9289cfb260f4bcecaf23a810584ef6ef8e8501.tar.gz
libbu++-4b9289cfb260f4bcecaf23a810584ef6ef8e8501.tar.bz2
libbu++-4b9289cfb260f4bcecaf23a810584ef6ef8e8501.tar.xz
libbu++-4b9289cfb260f4bcecaf23a810584ef6ef8e8501.zip
Ok, string stuff is working much, much better, a load of new unit tests have
been added, and I deleted a whole slew of stupid old tests that I don't need.
Diffstat (limited to '')
-rw-r--r--src/tests/url.cpp42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/tests/url.cpp b/src/tests/url.cpp
deleted file mode 100644
index a381cbe..0000000
--- a/src/tests/url.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 * Copyright (C) 2007-2011 Xagasoft, All rights reserved.
3 *
4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE.
6 */
7
8#include "bu/url.h"
9
10#include <stdio.h>
11
12int main( int argc, char *argv[] )
13{
14 for( argc--, argv++; argc >= 0; argc--, argv++ )
15 {
16 printf("encodede: %s\n", Bu::Url::encode( *argv ).getStr() );
17 printf("decodede: %s\n", Bu::Url::decode( *argv ).getStr() );
18 Bu::Url u( *argv );
19
20 printf("Protocol: %s\n", u.getProtocol().getStr() );
21 printf("User: %s\n", u.getUser().getStr() );
22 printf("Pass: %s\n", u.getPass().getStr() );
23 printf("Host: %s\n", u.getHost().getStr() );
24 printf("Path: %s\n", u.getPath().getStr() );
25 try
26 {
27 printf("Port: %d\n", u.getPort() );
28 } catch( Bu::ExceptionBase &e )
29 {
30 printf("Port: not set.\n");
31 }
32 printf("Parameters:\n");
33 for( Bu::Url::ParamList::const_iterator i = u.getParamBegin(); i; i++ )
34 {
35 printf(" \"%s\" = \"%s\"\n",
36 (*i).sName.getStr(), (*i).sValue.getStr()
37 );
38 }
39 }
40
41 return 0;
42}