From f18951675980966875fa7d4c188cbcb7c4183500 Mon Sep 17 00:00:00 2001 From: helge Date: Mon, 7 Jun 2004 13:08:36 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/trunk@20 d1b88da0-ebda-0310-925b-ed51d893ca5b --- OGoContentStore/misc/test1/common.h | 3 +++ OGoContentStore/misc/test1/test1.m | 31 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 OGoContentStore/misc/test1/common.h create mode 100644 OGoContentStore/misc/test1/test1.m diff --git a/OGoContentStore/misc/test1/common.h b/OGoContentStore/misc/test1/common.h new file mode 100644 index 00000000..f771957e --- /dev/null +++ b/OGoContentStore/misc/test1/common.h @@ -0,0 +1,3 @@ +// $Id$ + +#import diff --git a/OGoContentStore/misc/test1/test1.m b/OGoContentStore/misc/test1/test1.m new file mode 100644 index 00000000..7724b19d --- /dev/null +++ b/OGoContentStore/misc/test1/test1.m @@ -0,0 +1,31 @@ +// $Id$ + +#include "common.h" + +static void testurl(NSString *s) { + NSURL *url; + + url = [NSURL URLWithString:s]; + NSLog(@"url: %@", url); + NSLog(@" login: %@", [url user]); + NSLog(@" pwd: %@", [url password]); +} + +static void test(void) { + testurl(@"http://OGoUser:OGoPwd@localhost/OGo"); + testurl(@"postgresql://OGoUser:OGoPwd@localhost/OGo"); +} + +int main(int argc, char **argv, char **env) { + NSAutoreleasePool *pool; + + pool = [[NSAutoreleasePool alloc] init]; +#if LIB_FOUNDATION_LIBRARY + [NSProcessInfo initializeWithArguments:argv count:argc environment:env]; +#endif + + test(); + + [pool release]; + return 0; +} -- 2.39.5