fpc/tests/test/units/character/tisletterordigit2.pp
paul 3b9fd15af7 rtl: update character.pas by Inoussa OUEDRAOGO (issue #0020302)
* This new version contains all the unicode code points (BMP and other planes) character properties.

git-svn-id: trunk@19207 -
2011-09-24 15:17:12 +00:00

36 lines
827 B
ObjectPascal

program tisletterordigit2;
{$ifndef FPC}
{$APPTYPE CONSOLE}
{$endif}
uses
SysUtils,
character;
{$ifndef FPC}
type UnicodeChar = WideChar;
{$endif}
procedure DoError(ACode : Integer);
begin
WriteLn('Error #',ACode);
Halt(Acode);
end;
var
s : UnicodeString;
begin
s := UnicodeChar($D835) + UnicodeChar($DD75); //1D575;MATHEMATICAL BOLD FRAKTUR CAPITAL J
if not TCharacter.IsLetterOrDigit(s,1) then
DoError(1);
s := UnicodeChar($D835) + UnicodeChar($DFED); //1D7ED;MATHEMATICAL SANS-SERIF BOLD DIGIT ONE;Nd;0;EN;<font> 0031;1;1;1;N;;;;;
if not TCharacter.IsLetterOrDigit(s,1) then
DoError(2);
s := UnicodeChar($D83C) + UnicodeChar($DC00); //1F000;MAHJONG TILE EAST WIND;So;0;ON;;;;;N;;;;;
if TCharacter.IsLetterOrDigit(s,1) then
DoError(3);
WriteLn('ok');
end.