Browse Source

Use USE_INTERNAL_UNICODE to be able to test fpwidestrings on different targets

git-svn-id: trunk@38756 -
pierre 7 years ago
parent
commit
95e609cc56

+ 14 - 6
tests/webtbs/tw10482.pp

@@ -3,19 +3,27 @@ program fpctest4;
 {$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 darwin}iosxwstr{$else}cwstring{$endif},
-{$endif}
-{$ifdef USE_FPWIDESTRING_UNIT}
+ {$endif ndef USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
   fpwidestring,
-{$endif}
-{$ifdef USE_UNICODEDUCET_UNIT}
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
   unicodeducet,
-{$endif}
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
   Classes,sysutils,variants,typinfo;
 
 type

+ 16 - 11
tests/webtbs/tw11791.pp

@@ -1,23 +1,28 @@
 {$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}
-{$endif}
-{$ifdef USE_FPWIDESTRING_UNIT}
+ {$ifndef USE_INTERNAL_UNICODE}
+  {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
+ {$endif ndef USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
   fpwidestring,
-{$endif}
-{$ifdef USE_UNICODEDUCET_UNIT}
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
   unicodeducet,
-{$endif}
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
   Classes, SysUtils;
 
 

+ 25 - 10
tests/webtbs/tw12993.pp

@@ -1,20 +1,35 @@
 {$codepage cp866}
 
 {$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
+{$ifdef USE_INTERNAL_UNICODE}
   {$define USE_FPWIDESTRING_UNIT}
   {$define USE_UNICODEDUCET_UNIT}
-uses
-{$ifdef USE_FPWIDESTRING_UNIT}
-  fpwidestring,
-{$endif}
-{$ifdef USE_UNICODEDUCET_UNIT}
-  unicodeducet;
+  {$define USE_CPALL_UNIT}
 {$endif}
-{$endif}
-{$ifdef unix}
+
+{$ifndef USE_INTERNAL_UNICODE}
+  {$ifdef unix}
+  uses 
+    {$ifdef darwin}
+    iosxwstr
+    {$else}
+    cwstring
+    {$endif};
+ {$else def USE_INTERNAL_UNICODE}
 uses
-  {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
-{$endif}
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
+  strings;
+ {$endif ndef USE_INTERNAL_UNICODE}
 var
   s: ansistring;
   ws, ws3: widestring;

+ 15 - 7
tests/webtbs/tw13015.pp

@@ -8,20 +8,28 @@ program test;
 {$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}
 
 uses
-{$ifdef unix}
- {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
-{$endif}
-{$ifdef USE_FPWIDESTRING_UNIT}
+ {$ifndef USE_INTERNAL_UNICODE}
+  {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
+ {$endif ndef USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
   fpwidestring,
-{$endif}
-{$ifdef USE_UNICODEDUCET_UNIT}
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
   unicodeducet,
-{$endif}
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
  Classes,SysUtils,uw13015;
 
 procedure writefile(const fn: string);

+ 15 - 6
tests/webtbs/tw13075.pp

@@ -1,20 +1,29 @@
 {$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 darwin}iosxwstr{$else}cwstring{$endif},
-{$endif}
-{$ifdef USE_FPWIDESTRING_UNIT}
+ {$endif ndef USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
   fpwidestring,
-{$endif}
-{$ifdef USE_UNICODEDUCET_UNIT}
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
   unicodeducet,
-{$endif}
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
   Classes, SysUtils;
 
 function localUnicodeToUTF8(u: cardinal; Buf: PChar): integer;

+ 17 - 9
tests/webtbs/tw17591.pp

@@ -2,21 +2,29 @@ program comparetext;
 {$ifdef FPC}{$mode objfpc}{$h+}{$endif}
 {$ifdef mswindows}{$apptype console}{$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}
 uses
-{$ifdef USE_FPWIDESTRING_UNIT}
+ {$ifndef USE_INTERNAL_UNICODE}
+  {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
+ {$endif ndef USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
   fpwidestring,
-{$endif}
-{$ifdef USE_UNICODEDUCET_UNIT}
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
   unicodeducet,
-{$endif}
- sysutils
-{$ifdef unix}
- ,{$ifdef darwin}iosxwstr{$else}cwstring{$endif}
-{$endif}
-;
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
+  sysutils;
+
 var
  int1: integer;
  ustr1,ustr2: unicodestring;

+ 15 - 11
tests/webtbs/tw25198.pp

@@ -2,23 +2,27 @@ program concatenate_resourestrings_delphiunicode;
 
 {$mode delphiunicode}
 {$codepage cp1250}
-{$ifdef go32v2}
+{$ifdef USE_INTERNAL_UNICODE}
   {$define USE_FPWIDESTRING_UNIT}
   {$define USE_UNICODEDUCET_UNIT}
-uses
-{$ifdef USE_FPWIDESTRING_UNIT}
-  fpwidestring,
-{$endif}
-{$ifdef USE_UNICODEDUCET_UNIT}
-  unicodeducet;
-{$endif}
-
+  {$define USE_CPALL_UNIT}
 {$endif}
 
-{$ifdef unix}
+ {$ifndef USE_INTERNAL_UNICODE}
 uses
   {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
-{$endif}
+ {$else USE_INTERNAL_UNICODE}a
+uses
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall;
+ {$endif}
+ {$endif def USE_FPWIDESTRING_UNIT}
 
 resourcestring
   res2 = 'žlu�ouèký ' + 'koníèek';

+ 17 - 8
tests/webtbs/tw3235a.pp

@@ -1,19 +1,28 @@
 program TestStrIComp;
 
 {$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 USE_FPWIDESTRING_UNIT}
+uses
+ {$ifndef USE_INTERNAL_UNICODE}
+  {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
+ {$endif ndef USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
   fpwidestring,
-{$endif}
-{$ifdef USE_UNICODEDUCET_UNIT}
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
   unicodeducet,
-{$endif}
-    {$ifdef unix}{$ifdef darwin}iosxwstr{$else}cwstring{$endif},{$endif}
-    SysUtils;
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
+  SysUtils;
 
 var l: longint;
 begin

+ 15 - 5
tests/webtbs/tw3697.pp

@@ -2,17 +2,27 @@
 { Submitted by "Matthias Hryniszak" on  2005-02-26 }
 { e-mail: [email protected] }
 {$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}, {$endif}
-{$ifdef USE_FPWIDESTRING_UNIT}
+ {$ifndef USE_INTERNAL_UNICODE}
+  {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
+ {$endif ndef USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
   fpwidestring,
-{$endif}
-{$ifdef USE_UNICODEDUCET_UNIT}
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
   unicodeducet,
-{$endif}
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
   SysUtils;
 
 var

+ 18 - 11
tests/webtbs/tw4080.pp

@@ -1,21 +1,28 @@
 program tw4080;
 {$i+}
 {$ifdef go32v2}
+  {$define USE_INTERNAL_UNICODE}
+{$endif}
+
+{$ifdef USE_INTERNAL_UNICODE}
   {$define USE_FPWIDESTRING_UNIT}
   {$define USE_UNICODEDUCET_UNIT}
-uses
-{$ifdef USE_FPWIDESTRING_UNIT}
-  fpwidestring,
+  {$define USE_CPALL_UNIT}
 {$endif}
-{$ifdef USE_UNICODEDUCET_UNIT}
-  unicodeducet;
-{$endif}
-{$endif}
-
-{$ifdef unix}
 uses
-  {$ifdef darwin}iosxwstr{$else}cwstring{$endif};
-{$endif unix}
+ {$ifndef USE_INTERNAL_UNICODE}
+  {$ifdef darwin}iosxwstr{$else}cwstring{$endif},
+ {$endif ndef USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
+  fpwidestring,
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
+  unicodeducet,
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
+  strings;
 
 var
   S, S2 : array [1..15] of char;

+ 19 - 15
tests/webtbs/tw7006.pp

@@ -2,26 +2,30 @@ program av;
 {$ifdef FPC}{$mode objfpc}{$h+}{$INTERFACES CORBA}{$endif}
 {$ifdef mswindows}{$apptype console}{$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}
 uses
-{$ifdef FPC}
-  {$ifdef unix}
+ {$ifdef unix}
   cthreads,
-    {$ifdef darwin}
-    iosxwstr
-    {$else}
-    cwstring
-    {$endif}
-  ,{$endif}
-  {$ifdef USE_FPWIDESTRING_UNIT}
-    fpwidestring,
-  {$endif}
-  {$ifdef USE_UNICODEDUCET_UNIT}
-    unicodeducet,
-  {$endif}
-{$endif}
+ {$endif unix}
+ {$ifndef USE_INTERNAL_UNICODE}
+  {$ifdef darwin}iosxwstr{$else}cwstring{$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;
 type
  testrecty = record

+ 14 - 8
tests/webtbs/tw7758.pp

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

+ 16 - 8
tests/webtbs/tw7758a.pp

@@ -1,19 +1,27 @@
 { %norun }
 
 {$ifdef go32v2}
-  {$define use_fpwidestring_unit}
-  {$define use_unicodeducet_unit}
+  {$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 darwin}iosxwstr{$else}cwstring{$endif},
-  {$endif}
-{$ifdef USE_FPWIDESTRING_UNIT}
+ {$endif ndef USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
   fpwidestring,
-{$endif}
-{$ifdef USE_UNICODEDUCET_UNIT}
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
   unicodeducet,
-{$endif}
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
   sysutils;
 
 { just to make sure that no all wide->shortstring compile time conversions }

+ 14 - 6
tests/webtbs/tw9161.pp

@@ -1,17 +1,25 @@
 {$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 darwin}iosxwstr{$else}cwstring{$endif},
-{$endif}
-{$ifdef USE_FPWIDESTRING_UNIT}
+ {$endif ndef USE_INTERNAL_UNICODE}
+ {$ifdef USE_FPWIDESTRING_UNIT}
   fpwidestring,
-{$endif}
-{$ifdef USE_UNICODEDUCET_UNIT}
+ {$endif}
+ {$ifdef USE_UNICODEDUCET_UNIT}
   unicodeducet,
-{$endif}
+ {$endif}
+ {$ifdef USE_CPALL_UNIT}
+  cpall,
+ {$endif}
   variants,sysutils;
 var a:variant;
     x,y: array of byte;