From: helge Date: Mon, 7 Jun 2004 13:08:36 +0000 (+0000) Subject: git-svn-id: http://svn.opengroupware.org/SOGo/trunk@20 d1b88da0-ebda-0310-925b-ed51d8... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f18951675980966875fa7d4c188cbcb7c4183500;p=scalable-opengroupware.org git-svn-id: http://svn.opengroupware.org/SOGo/trunk@20 d1b88da0-ebda-0310-925b-ed51d893ca5b --- 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; +}