]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@20 d1b88da0-ebda-0310-925b-ed51d8...
authorhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 7 Jun 2004 13:08:36 +0000 (13:08 +0000)
committerhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 7 Jun 2004 13:08:36 +0000 (13:08 +0000)
OGoContentStore/misc/test1/common.h [new file with mode: 0644]
OGoContentStore/misc/test1/test1.m [new file with mode: 0644]

diff --git a/OGoContentStore/misc/test1/common.h b/OGoContentStore/misc/test1/common.h
new file mode 100644 (file)
index 0000000..f771957
--- /dev/null
@@ -0,0 +1,3 @@
+// $Id$
+
+#import <Foundation/Foundation.h>
diff --git a/OGoContentStore/misc/test1/test1.m b/OGoContentStore/misc/test1/test1.m
new file mode 100644 (file)
index 0000000..7724b19
--- /dev/null
@@ -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;
+}