فهرست منبع

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

git-svn-id: trunk@34168 -
pierre 9 سال پیش
والد
کامیت
e9a1ed9446
7فایلهای تغییر یافته به همراه81 افزوده شده و 5 حذف شده
  1. 16 0
      tests/test/tcpstr1.pp
  2. 11 0
      tests/test/tunistr6.pp
  3. 11 0
      tests/test/tunistr7.pp
  4. 3 3
      tests/test/twide3.pp
  5. 11 0
      tests/test/twide6.pp
  6. 12 2
      tests/test/twide7.pp
  7. 17 0
      tests/test/twrstr9.pp

+ 16 - 0
tests/test/tcpstr1.pp

@@ -1,6 +1,22 @@
+{$ifdef go32v2}
+  {$define USE_FPWIDESTRING_UNIT}
+  {$define USE_UNICODEDUCET_UNIT}
+{$endif}
 {$ifdef unix}
 {$ifdef unix}
 uses
 uses
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
   {$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}
 {$endif}
 
 
 type
 type

+ 11 - 0
tests/test/tunistr6.pp

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

+ 11 - 0
tests/test/tunistr7.pp

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

+ 3 - 3
tests/test/twide3.pp

@@ -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
 { 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)
   usually not the case on windows (and never can be the case on OS/2)
 }
 }
@@ -27,7 +27,7 @@ begin
   writeln(t,'łóżka');
   writeln(t,'łóżka');
   close(t);
   close(t);
   reset(t);
   reset(t);
-  
+
   try
   try
     read(t,wc);
     read(t,wc);
     if wc<>'ł' then
     if wc<>'ł' then
@@ -37,7 +37,7 @@ begin
 //    erase(t);
 //    erase(t);
     raise;
     raise;
   end;
   end;
-    
+
   reset(t);
   reset(t);
   try
   try
     readln(t,a);
     readln(t,a);

+ 11 - 0
tests/test/twide6.pp

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

+ 12 - 2
tests/test/twide7.pp

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

+ 17 - 0
tests/test/twrstr9.pp

@@ -1,8 +1,25 @@
 {$codepage utf8}
 {$codepage utf8}
 
 
+{$ifdef go32v2}
+  {$define USE_FPWIDESTRING_UNIT}
+  {$define USE_UNICODEDUCET_UNIT}
+{$endif}
+
 {$ifdef unix}
 {$ifdef unix}
 uses
 uses
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
   {$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}
 {$endif}
 
 
 type
 type