Browse Source

Add units required for wide strings support for go32v2 target

git-svn-id: trunk@38743 -
pierre 7 years ago
parent
commit
823bb7bd07

+ 23 - 1
tests/test/talign2.pp

@@ -12,6 +12,15 @@ program talign2;
 {$ifdef fpc}
 {$mode objfpc}
 {$define haswidestring}
+{$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
+
+{$ifdef USE_INTERNAL_UNICODE}
+  {$define USE_FPWIDESTRING_UNIT}
+  {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_CPALL_UNIT}
+{$endif}
 {$else}
   {$ifndef ver70}
     {$define haswidestring}
@@ -19,10 +28,23 @@ program talign2;
 {$endif}
 
 {$ifdef fpc}
+{$ifndef USE_INTERNAL_UNICODE}
 {$ifdef unix}
 uses
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
-{$endif}
+{$endif unix}
+{$else USE_INTERNAL_UNICODE}
+uses
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall;
+ {$endif}
+{$endif USE_INTERNAL_UNICODE}
 {$endif}
 
 {$ifdef CPUI8086}

+ 4 - 2
tests/test/tcpstr1.pp

@@ -7,10 +7,12 @@
   {$define USE_UNICODEDUCET_UNIT}
   {$define USE_CPALL_UNIT}
 {$endif}
+{$ifndef USE_INTERNAL_UNICODE}
 {$ifdef unix}
 uses
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
-{$else}
+{$endif}
+{$else def USE_INTERNAL_UNICODE}
 uses
  {$ifdef USE_FPWIDESTRING_UNIT}
   fpwidestring,
@@ -25,7 +27,7 @@ uses
    but simpifies the conditional construction
    for fpwidestring and unicodeducet use }
   strings;
-{$endif}
+{$endif def USE_INTERNAL_UNICODE}
 
 type
   tcpstr1 = type AnsiString(1253);

+ 4 - 2
tests/test/tcpstr13.pp

@@ -13,10 +13,12 @@ program tcpstr13;
 {$endif}
 {$mode delphi}
 
+{$ifndef USE_INTERNAL_UNICODE}
 {$ifdef unix}
 uses
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
-{$else}
+{$endif unix}
+{$else def USE_INTERNAL_UNICODE}
 uses
  {$ifdef USE_FPWIDESTRING_UNIT}
   fpwidestring,
@@ -31,7 +33,7 @@ uses
    but simpifies the conditional construction
    for fpwidestring and unicodeducet use }
   strings;
-{$endif}
+{$endif def USE_INTERNAL_UNICODE}
 
 
 type

+ 4 - 2
tests/test/tcpstr17.pp

@@ -16,10 +16,12 @@ program tcpstr17;
 {$endif}
 {$apptype console}
 
+{$ifndef USE_INTERNAL_UNICODE}
 {$ifdef unix}
 uses
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
-{$else}
+{$endif unix}
+{$else def USE_INTERNAL_UNICODE}
 uses
  {$ifdef USE_FPWIDESTRING_UNIT}
   fpwidestring,
@@ -34,7 +36,7 @@ uses
    but simpifies the conditional construction
    for fpwidestring and unicodeducet use }
   strings;
-{$endif}
+{$endif def USE_INTERNAL_UNICODE}
 
 const
 {$ifdef android}

+ 28 - 1
tests/test/tcpstr18.pp

@@ -1,14 +1,41 @@
 // to have correct test result with delphi set codepage option to 866
-program tcpstr17;
+program tcpstr18;
 {$apptype console}
 {$ifdef fpc}
   {$mode delphi}
   {$codepage cp866}
 {$endif}
 
+{$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
+
+{$ifdef USE_INTERNAL_UNICODE}
+  {$define USE_FPWIDESTRING_UNIT}
+  {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_CPALL_UNIT}
+{$endif}
+{$ifndef USE_INTERNAL_UNICODE}
 {$ifdef unix}
 uses
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
+{$endif unix}
+{$else USE_INTERNAL_UNICODE}
+uses
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
+ { The unit strings is not really used here,
+   but simpifies the conditional construction
+   for fpwidestring and unicodeducet use }
+  strings;
+{$endif def USE_INTERNAL_UNICODE}
 {$endif}
 
 procedure TestRawByte(const Source: RawByteString; cp: word; const reason: integer);

+ 2 - 0
tests/test/tcpstr19.pp

@@ -22,9 +22,11 @@ program tcpstr19;
 {$endif}
 
 uses
+{$ifndef USE_INTERNAL_UNICODE}
 {$ifdef unix}
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
 {$endif}
+{$endif ndef USE_INTERNAL_UNICODE}
 {$ifdef USE_FPWIDESTRING_UNIT}
   fpwidestring,
 {$endif}

+ 4 - 2
tests/test/tcpstr27.pp

@@ -8,10 +8,12 @@
   {$define USE_CPALL_UNIT}
 {$endif}
 
+{$ifndef USE_INTERNAL_UNICODE}
 {$ifdef unix}
 uses
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
-{$else}
+{$endif unix}
+{$else def USE_INTERNAL_UNICODE}
 uses
  {$ifdef USE_FPWIDESTRING_UNIT}
   fpwidestring,
@@ -26,7 +28,7 @@ uses
    but simpifies the conditional construction
    for fpwidestring and unicodeducet use }
   strings;
-{$endif}
+{$endif def USE_INTERNAL_UNICODE}
 
 
 var

+ 4 - 2
tests/test/tcpstr9.pp

@@ -11,10 +11,12 @@
 program tcpstr9;
 {$mode delphiunicode}
 {$apptype console}
+{$ifndef USE_INTERNAL_UNICODE}
 {$ifdef unix}
 uses
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
-{$else}
+{$endif unix}
+{$else def USE_INTERNAL_UNICODE}
 uses
  {$ifdef USE_FPWIDESTRING_UNIT}
   fpwidestring,
@@ -29,7 +31,7 @@ uses
    but simpifies the conditional construction
    for fpwidestring and unicodeducet use }
   strings;
-{$endif}
+{$endif def USE_INTERNAL_UNICODE}
 
 begin
   // this test can be only run with the compiler built right now on the

+ 21 - 0
tests/test/tstrutils1.pp

@@ -4,12 +4,33 @@ program tstrutils1;
 
 {$mode objfpc}
 {$h+}
+{$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
+
+{$ifdef USE_INTERNAL_UNICODE}
+  {$define USE_FPWIDESTRING_UNIT}
+  {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_CPALL_UNIT}
+{$endif}
 
 uses
   {SysUtils, }
+{$ifndef USE_INTERNAL_UNICODE}
 {$ifdef unix}
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
 {$endif unix}
+{$else USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
+{$endif def USE_INTERNAL_UNICODE}
   StrUtils;
 
 var

+ 23 - 3
tests/test/tstrutils2.pp

@@ -1,6 +1,15 @@
 {$codepage utf8}
 program tstrutils2;
 
+{$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
+
+{$ifdef USE_INTERNAL_UNICODE}
+  {$define USE_FPWIDESTRING_UNIT}
+  {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_CPALL_UNIT}
+{$endif}
 // tests MBCS compatibility of strutils ansistartstext and -endstext.
 // (case-insensitive)
 
@@ -8,11 +17,22 @@ program tstrutils2;
 {$h+}
 
 uses
-  StrUtils
+{$ifndef USE_INTERNAL_UNICODE}
 {$ifdef unix}
-  ,{$ifdef darwin}iosxwstr{$else}cwstring{$endif}
+  {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
 {$endif unix}
-  ;
+{$else USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
+{$endif def USE_INTERNAL_UNICODE}
+  StrUtils;
 
 var
   ResultCounter: Integer = 0;

+ 28 - 1
tests/test/tunistr1.pp

@@ -1,7 +1,34 @@
+{$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
+
+{$ifdef USE_INTERNAL_UNICODE}
+  {$define USE_FPWIDESTRING_UNIT}
+  {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_CPALL_UNIT}
+{$endif}
+{$ifndef USE_INTERNAL_UNICODE}
 {$ifdef unix}
 uses
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
-{$endif unix}
+{$endif}
+{$else USE_INTERNAL_UNICODE}
+uses
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
+ { The unit strings is not really used here,
+   but simpifies the conditional construction
+   for fpwidestring and unicodeducet use }
+  strings;
+{$endif}
+{$endif def USE_INTERNAL_UNICODE}
 
 var
   w : unicodestring;

+ 29 - 2
tests/test/tunistr2.pp

@@ -1,7 +1,34 @@
-{$ifdef UNIX}
+{$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
+
+{$ifdef USE_INTERNAL_UNICODE}
+  {$define USE_FPWIDESTRING_UNIT}
+  {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_CPALL_UNIT}
+{$endif}
+{$ifndef USE_INTERNAL_UNICODE}
+{$ifdef unix}
 uses
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
-{$endif UNIX}
+{$endif}
+{$else USE_INTERNAL_UNICODE}
+uses
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
+ { The unit strings is not really used here,
+   but simpifies the conditional construction
+   for fpwidestring and unicodeducet use }
+  strings;
+{$endif}
+{$endif def USE_INTERNAL_UNICODE}
 
 var
   i : longint;

+ 22 - 1
tests/test/tunistr4.pp

@@ -3,10 +3,31 @@
 {$mode objfpc}
 {$endif fpc}
 
+{$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
+
+{$ifdef USE_INTERNAL_UNICODE}
+  {$define USE_FPWIDESTRING_UNIT}
+  {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_CPALL_UNIT}
+{$endif}
 uses
 {$ifdef unix}
-  cthreads, {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
+  cthreads,
+  {$ifndef USE_INTERNAL_UNICODE}
+    {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
+  {$endif ndef USE_INTERNAL_UNICODE}
 {$endif}
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
   Classes, SysUtils;
 
 type

+ 23 - 3
tests/test/twide3.pp

@@ -5,11 +5,31 @@
 {$codepage utf-8}
 
 {$mode objfpc}
+{$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
 
-uses
-{$ifdef unix}
-  {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
+{$ifdef USE_INTERNAL_UNICODE}
+  {$define USE_FPWIDESTRING_UNIT}
+  {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_CPALL_UNIT}
 {$endif}
+
+uses
+{$ifndef USE_INTERNAL_UNICODE}
+  {$ifdef unix}
+    {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
+  {$endif}
+{$endif ndef USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
   SysUtils;
 
 {$i+}

+ 27 - 0
tests/test/units/system/tdir2.pp

@@ -13,10 +13,37 @@ Program tdir;
 {$codepage utf-8}
 {$I-}
 
+{$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
+
+{$ifdef USE_INTERNAL_UNICODE}
+  {$define USE_FPWIDESTRING_UNIT}
+  {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_CPALL_UNIT}
+{$endif}
+{$ifndef USE_INTERNAL_UNICODE}
 {$ifdef unix}
 uses
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
+{$endif unix}
+{$else USE_INTERNAL_UNICODE}
+uses
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
+ { The unit strings is not really used here,
+   but simpifies the conditional construction
+   for fpwidestring and unicodeducet use }
+  strings;
 {$endif}
+{$endif def USE_INTERNAL_UNICODE}
 
 procedure test(value, required: longint);
 begin

+ 22 - 1
tests/test/units/system/tfiledir.pp

@@ -1,10 +1,31 @@
 {$codepage utf8}
 {$mode objfpc}{$h+}
 
+{$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
+
+{$ifdef USE_INTERNAL_UNICODE}
+  {$define USE_FPWIDESTRING_UNIT}
+  {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_CPALL_UNIT}
+{$endif}
+
 uses
 {$ifdef unix}
-  {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
+  {$ifndef USE_INTERNAL_UNICODE}
+    {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
+  {$endif ndef USE_INTERNAL_UNICODE}
 {$endif}
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
   sysutils;
 
 const

+ 22 - 2
tests/test/units/sysutils/tastrcmp.pp

@@ -24,10 +24,30 @@
 {$mode delphi}
 {$endif fpc}
 
+{$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
+
+{$ifdef USE_INTERNAL_UNICODE}
+  {$define USE_FPWIDESTRING_UNIT}
+  {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_CPALL_UNIT}
+{$endif}
 uses
-{$ifdef unix}
+{$ifndef USE_INTERNAL_UNICODE}
+ {$ifdef unix}
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
-{$endif unix}
+ {$endif unix}
+{$endif not USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
   SysUtils;
 
 var

+ 23 - 4
tests/test/units/sysutils/tfexpand2.pp

@@ -22,15 +22,34 @@ program TFExpand;
 {$DEFINE DEBUG}
 (* Defining DEBUG causes all the source and target strings *)
 (* to be written to the console to make debugging easier.  *)
+{$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
 
+{$ifdef USE_INTERNAL_UNICODE}
+  {$define USE_FPWIDESTRING_UNIT}
+  {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_CPALL_UNIT}
+{$endif}
 uses
 {$ifdef FPC}
  PopupErr,
 {$endif FPC}
-{$ifdef unix}
- {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
-{$endif}
- SysUtils;
+{$ifndef USE_INTERNAL_UNICODE}
+ {$ifdef unix}
+  {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
+ {$endif unix}
+{$endif not USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
+  SysUtils;
 
 {$IFDEF LINUX}
  {$IFNDEF UNIX}

+ 23 - 3
tests/test/units/sysutils/tffirst.pp

@@ -2,10 +2,30 @@
 
 {$codepage utf8}
 
+{$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
+
+{$ifdef USE_INTERNAL_UNICODE}
+  {$define USE_FPWIDESTRING_UNIT}
+  {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_CPALL_UNIT}
+{$endif}
 uses
-{$ifdef unix}
+{$ifndef USE_INTERNAL_UNICODE}
+ {$ifdef unix}
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
-{$endif}
+ {$endif unix}
+{$endif not USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
   SysUtils;
 
 procedure tffirstutf8;
@@ -233,4 +253,4 @@ end;
 begin
   tffirstutf8;
   tffirstutf16;
-end.  
+end.  

+ 23 - 1
tests/test/units/sysutils/tlocale.pp

@@ -1,10 +1,32 @@
 { %interactive }
 
+{$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
+
+{$ifdef USE_INTERNAL_UNICODE}
+  {$define USE_FPWIDESTRING_UNIT}
+  {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_CPALL_UNIT}
+{$endif}
 uses
 {$ifdef unix}
-  {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
   clocale,
 {$endif}
+{$ifndef USE_INTERNAL_UNICODE}
+ {$ifdef unix}
+  {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
+ {$endif unix}
+{$endif not USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
   SysUtils;
 
 procedure PrintSettings;

+ 22 - 3
tests/test/units/sysutils/tstrcmp.pp

@@ -23,11 +23,30 @@
 {$ifdef fpc}
 {$mode delphi}
 {$endif fpc}
-
+{$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
+
+{$ifdef USE_INTERNAL_UNICODE}
+  {$define USE_FPWIDESTRING_UNIT}
+  {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_CPALL_UNIT}
+{$endif}
 uses
-{$ifdef unix}
+{$ifndef USE_INTERNAL_UNICODE}
+ {$ifdef unix}
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
-{$endif unix}
+ {$endif unix}
+{$endif not USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
   SysUtils;
 
 var

+ 23 - 3
tests/test/units/sysutils/tunifile.pp

@@ -1,11 +1,31 @@
 {$codepage utf8}
 {$mode objfpc}{$h+}
 
+{$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
+
+{$ifdef USE_INTERNAL_UNICODE}
+  {$define USE_FPWIDESTRING_UNIT}
+  {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_CPALL_UNIT}
+{$endif}
 uses
-{$ifdef unix}
+{$ifndef USE_INTERNAL_UNICODE}
+ {$ifdef unix}
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
-{$endif}
-  sysutils;
+ {$endif unix}
+{$endif not USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
+  SysUtils;
 
 type
   tcpstr866 = type ansistring(866);

+ 22 - 2
tests/test/units/sysutils/twstrcmp.pp

@@ -25,10 +25,30 @@
 {$modeswitch unicodestrings}
 {$endif fpc}
 
+{$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
+
+{$ifdef USE_INTERNAL_UNICODE}
+  {$define USE_FPWIDESTRING_UNIT}
+  {$define USE_UNICODEDUCET_UNIT}
+  {$define USE_CPALL_UNIT}
+{$endif}
 uses
-{$ifdef unix}
+{$ifndef USE_INTERNAL_UNICODE}
+ {$ifdef unix}
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
-{$endif unix}
+ {$endif unix}
+{$endif not USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
   SysUtils;
 
 var