mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 17:51:01 +00:00
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32187 72102866-910b-0410-8b05-ffd578937521
37 lines
1.4 KiB
Objective-C
37 lines
1.4 KiB
Objective-C
#import <Foundation/Foundation.h>
|
|
#import "Testing.h"
|
|
|
|
int main()
|
|
{
|
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
|
id o;
|
|
|
|
/* The path utilities provide information about the current user and
|
|
* the current filesystem layout ... and are inherently system dependent
|
|
* so we can't know if they are operating correctly. The best we can do
|
|
* are trivial checks to see if their results look sane.
|
|
*/
|
|
NSLog(@"NSUserName() %@", o = NSUserName());
|
|
PASS([o length] > 0, "we can get a user name");
|
|
NSLog(@"NSFullUserName() %@", o = NSFullUserName());
|
|
PASS([o length] > 0, "we can get a full user name");
|
|
NSLog(@"NSHomeDirectory() %@", o = NSHomeDirectory());
|
|
PASS([o length] > 0, "we can get a home directory");
|
|
NSLog(@"NSTemporaryDirectory() %@", o = NSTemporaryDirectory());
|
|
PASS([o length] > 0, "we can get a temporary directory");
|
|
NSLog(@"NSOpenStepRootDirectory() %@", o = NSOpenStepRootDirectory());
|
|
PASS([o length] > 0, "we can get a root directory");
|
|
|
|
/* These functions have been removed in recent OSX but are retained in GNUstep
|
|
*/
|
|
#if defined(GNUSTEP_BASE_LIBRARY)
|
|
NSLog(@"NSStandardApplicationPaths() %@", o = NSStandardApplicationPaths());
|
|
PASS([o count] > 0, "we have application paths");
|
|
NSLog(@"NSStandardLibraryPaths() %@", o = NSStandardLibraryPaths());
|
|
PASS([o count] > 0, "we have library paths");
|
|
#endif
|
|
|
|
[pool release]; pool = nil;
|
|
|
|
return 0;
|
|
}
|