fpc/tests/test/tcpstransistrcompare.pp
paul 6f08c86eb1 merge r17486 from cpstrnew branch by michael:
* New tests from Inoussa to test various code-page string related issues

git-svn-id: trunk@19115 -
2011-09-17 13:37:41 +00:00

31 lines
440 B
ObjectPascal

uses
{$ifdef unix}
cwstring,
{$endif unix}
SysUtils;
type
ts850 = type string<850>;
ts1251 = type string<1251>;
var
a850:ts850;
a1251 : ts1251;
au : utf8string;
begin
au := #$00AE#$00A7;
a850 := au;
a1251 := au;
if (a850>a1251) then
halt(1);
if (a850<a1251) then
halt(2);
a850 := a850 + 'a';
if (a850<=a1251) then
halt(3);
if (a1251>=a850) then
halt(4);
writeln('ok');
end.