mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
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:
parent
3822981d96
commit
810fadd9c3
1 changed files with 20 additions and 0 deletions
20
Tests/base/NSString/noncharacter.m
Normal file
20
Tests/base/NSString/noncharacter.m
Normal 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;
|
||||
}
|
||||
|
Loading…
Reference in a new issue