mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
import testsuite
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32187 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
734c214892
commit
0e02133729
374 changed files with 20864 additions and 0 deletions
40
Tests/base/NSFileManager/unrepresentable_filenames.m
Normal file
40
Tests/base/NSFileManager/unrepresentable_filenames.m
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
copyright 2004 Alexander Malmberg <alexander@malmberg.org>
|
||||
*/
|
||||
|
||||
#import "Testing.h"
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSAutoreleasePool.h>
|
||||
#import <Foundation/NSFileManager.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
NSFileManager *fm=[NSFileManager defaultManager];
|
||||
NSArray *files;
|
||||
int i;
|
||||
BOOL e,d;
|
||||
|
||||
files=[fm directoryContentsAtPath: @"."];
|
||||
printf("%i files\n",[files count]);
|
||||
for (i=0;i<[files count];i++)
|
||||
{
|
||||
int j;
|
||||
NSString *f=[files objectAtIndex: i];
|
||||
e=[fm fileExistsAtPath: f
|
||||
isDirectory: &d];
|
||||
printf("%5i: %i %i %s\n",i,e,d, [f lossyCString]);
|
||||
for (j=0;j<[f length];j++)
|
||||
printf(" %3i: %04x\n",j,[f characterAtIndex: j]);
|
||||
}
|
||||
|
||||
/* const char *test="hallå.txt";
|
||||
NSString *s=[NSString stringWithCString: test];
|
||||
printf("s=%s\n", [s lossyCString]);*/
|
||||
|
||||
[arp release]; arp = nil;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue