Add fpwidestring and unicodeducet units for go32v2 tests related to unicode support

git-svn-id: trunk@34168 -
This commit is contained in:
pierre 2016-07-22 06:26:17 +00:00
parent 7ff12e144f
commit e9a1ed9446
7 changed files with 81 additions and 5 deletions

View File

@ -1,6 +1,22 @@
{$ifdef go32v2}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$endif}
{$ifdef unix}
uses
{$ifdef darwin}iosxwstr{$else}cwstring{$endif};
{$else}
uses
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{ The unit strings is not really used here,
but simpifies the conditional construction
for fpwidestring and unicodeducet use }
strings;
{$endif}
type

View File

@ -1,9 +1,20 @@
{%skiptarget=wince}
{$codepage utf-8}
{$ifdef go32v2}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$endif}
uses
{$ifdef unix}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
sysutils;
procedure doerror(i : integer);

View File

@ -1,9 +1,20 @@
{$codepage utf-8}
{$ifdef go32v2}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$endif}
uses
{$ifdef unix}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif unix}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
sysutils;
procedure testwcmp;

View File

@ -1,4 +1,4 @@
{ %skiptarget=win32,win64,wince,os2,emx }
{ %skiptarget=win32,win64,wince,os2,emx,go32v2,msdos }
{ This test is only useful if the local codepage is utf-8 which
usually not the case on windows (and never can be the case on OS/2)
}
@ -27,7 +27,7 @@ begin
writeln(t,'łóżka');
close(t);
reset(t);
try
read(t,wc);
if wc<>'ł' then
@ -37,7 +37,7 @@ begin
// erase(t);
raise;
end;
reset(t);
try
readln(t,a);

View File

@ -1,8 +1,19 @@
{%skiptarget=wince}
{$codepage utf-8}
{$ifdef go32v2}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$endif}
uses
{$ifdef unix}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
sysutils;

View File

@ -1,9 +1,19 @@
{$codepage utf-8}
{$ifdef go32v2}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$endif}
uses
{$ifdef unix}
{$ifdef darwin}iosxwstr{$else}cwstring{$endif},
{$endif unix}
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
sysutils;
procedure testwcmp;
@ -16,7 +26,7 @@ begin
s:=w1;
w1:=s;
w2:=w1;
if (w1<>w2) then
halt(1);
w1[2]:='f';
@ -44,4 +54,4 @@ end;
begin
testwcmp;
end.
end.

View File

@ -1,8 +1,25 @@
{$codepage utf8}
{$ifdef go32v2}
{$define USE_FPWIDESTRING_UNIT}
{$define USE_UNICODEDUCET_UNIT}
{$endif}
{$ifdef unix}
uses
{$ifdef darwin}iosxwstr{$else}cwstring{$endif};
{$else}
uses
{$ifdef USE_FPWIDESTRING_UNIT}
fpwidestring,
{$endif}
{$ifdef USE_UNICODEDUCET_UNIT}
unicodeducet,
{$endif}
{ The unit strings is not really used here,
but simpifies the conditional construction
for fpwidestring and unicodeducet use }
strings;
{$endif}
type