test for unicode noncharacter codepoint

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40107 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2016-09-26 10:59:02 +00:00
parent 3822981d96
commit 810fadd9c3

View file

@ -0,0 +1,20 @@
/* Test for unicode noncharacter codepoints
*/
#import "Testing.h"
#import <Foundation/NSString.h>
int main(int argc, char **argv)
{
NSString *str;
unichar u;
u = (unichar)0xffff;
str = [[NSString alloc] initWithCharacters: &u length: 1];
PASS([str length] == 1, "ffff codpepoint is permitted in string");
PASS([str characterAtIndex: 0] == 0xffff, "ffff is returned properly");
[str release];
return 0;
}