@@ -19,17 +19,22 @@ #import "OFSystemInfo.h" #import "OFAutoreleasePool.h" #import "TestsAppDelegate.h" + +#import "OFNotImplementedException.h" static OFString *module = @"OFSystemInfo"; @implementation TestsAppDelegate (OFSystemInfoTests) - (void)systemInfoTests { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; +#ifdef OF_HAVE_FILES + OFString *userConfigPath, *userDataPath; +#endif PRINT(GREEN, @"Page size: %zd", [OFSystemInfo pageSize]); PRINT(GREEN, @"Number of CPUs: %zd", [OFSystemInfo numberOfCPUs]); @@ -46,13 +51,23 @@ PRINT(GREEN, @"Operating system version: %@", [OFSystemInfo operatingSystemVersion]); #ifdef OF_HAVE_FILES - PRINT(GREEN, @"User data path: %@", [OFSystemInfo userDataPath]); + @try { + userConfigPath = [OFSystemInfo userConfigPath]; + } @catch (OFNotImplementedException *e) { + userConfigPath = @"Not implemented"; + } + PRINT(GREEN, @"User config path: %@", userConfigPath); - PRINT(GREEN, @"User config path: %@", [OFSystemInfo userConfigPath]); + @try { + userDataPath = [OFSystemInfo userDataPath]; + } @catch (OFNotImplementedException *e) { + userDataPath = @"Not implemented"; + } + PRINT(GREEN, @"User data path: %@", userDataPath); #endif PRINT(GREEN, @"CPU vendor: %@", [OFSystemInfo CPUVendor]); #if defined(OF_X86_64) || defined(OF_X86)