sogo/OGoContentStore/misc/test1/test1.m
dev-unix.inverse.qc.ca f18c764ffa see ChangeLog
Monotone-Revision: 9054022ef1ca8aeba6e34842d27d9b94ce002b89

Monotone-Author: dev-unix.inverse.qc.ca
Monotone-Date: 2006-06-15T19:34:10
Monotone-Branch: ca.inverse.sogo
2006-06-15 19:34:10 +00:00

32 lines
630 B
Objective-C

// $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;
}