Browse Source

* update string tests to define USE_INTERNAL_UNICODE also for the WASI platform
(previously it was only for go32v2). This makes them use the fpwidestring unit
for Unicode support.

Nikolay Nikolov 2 weeks ago
parent
commit
4782efd43e
47 changed files with 47 additions and 47 deletions
  1. 1 1
      tests/test/talign2.pp
  2. 1 1
      tests/test/tcpstr1.pp
  3. 1 1
      tests/test/tcpstr13.pp
  4. 1 1
      tests/test/tcpstr17.pp
  5. 1 1
      tests/test/tcpstr18.pp
  6. 1 1
      tests/test/tcpstr19.pp
  7. 1 1
      tests/test/tcpstr27.pp
  8. 1 1
      tests/test/tcpstr9.pp
  9. 1 1
      tests/test/tcpstransistr2shortstring.pp
  10. 1 1
      tests/test/tcpstransistr2widechararray.pp
  11. 1 1
      tests/test/tcpstransistr2widechararray2.pp
  12. 1 1
      tests/test/tcpstransistrcompare.pp
  13. 1 1
      tests/test/tcpstransistrcompareequal.pp
  14. 1 1
      tests/test/tcpstransistrcopy.pp
  15. 1 1
      tests/test/tcpstrchar2ansistr.pp
  16. 1 1
      tests/test/tcpstrconcat.pp
  17. 1 1
      tests/test/tcpstrconcat2.pp
  18. 1 1
      tests/test/tcpstrconcat3.pp
  19. 1 1
      tests/test/tcpstrconcatmulti.pp
  20. 1 1
      tests/test/tcpstrconcatmulti2.pp
  21. 1 1
      tests/test/tcpstrpchar2ansistr.pp
  22. 1 1
      tests/test/tcpstrsetlength.pp
  23. 1 1
      tests/test/tcpstrsetlength2.pp
  24. 1 1
      tests/test/tcpstrshortstr2ansistr.pp
  25. 1 1
      tests/test/tunistr1.pp
  26. 1 1
      tests/test/tunistr2.pp
  27. 1 1
      tests/test/tunistr4.pp
  28. 1 1
      tests/test/tunistr6.pp
  29. 1 1
      tests/test/tunistr7.pp
  30. 1 1
      tests/test/twide1.pp
  31. 1 1
      tests/test/twide2.pp
  32. 1 1
      tests/test/twide3.pp
  33. 1 1
      tests/test/twide4.pp
  34. 1 1
      tests/test/twide6.pp
  35. 1 1
      tests/test/twide7.pp
  36. 1 1
      tests/test/twrstr9.pp
  37. 1 1
      tests/test/units/strutils/tstrutils1.pp
  38. 1 1
      tests/test/units/strutils/tstrutils2.pp
  39. 1 1
      tests/test/units/system/tdir2.pp
  40. 1 1
      tests/test/units/system/tfiledir.pp
  41. 1 1
      tests/test/units/sysutils/tastrcmp.pp
  42. 1 1
      tests/test/units/sysutils/tfexpand2.pp
  43. 1 1
      tests/test/units/sysutils/tffirst.pp
  44. 1 1
      tests/test/units/sysutils/tlocale.pp
  45. 1 1
      tests/test/units/sysutils/tstrcmp.pp
  46. 1 1
      tests/test/units/sysutils/tunifile.pp
  47. 1 1
      tests/test/units/sysutils/twstrcmp.pp

+ 1 - 1
tests/test/talign2.pp

@@ -8,7 +8,7 @@ program talign2;
 {$ifdef fpc}
 {$ifdef fpc}
 {$mode objfpc}
 {$mode objfpc}
 {$define haswidestring}
 {$define haswidestring}
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstr1.pp

@@ -1,4 +1,4 @@
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstr13.pp

@@ -2,7 +2,7 @@ program tcpstr13;
 
 
 // check that copy operation converts from 866 to DefaultSystemCodePage encoding
 // check that copy operation converts from 866 to DefaultSystemCodePage encoding
 
 
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstr17.pp

@@ -1,6 +1,6 @@
 // to have correct test result with delphi set codepage option to 65001
 // to have correct test result with delphi set codepage option to 65001
 program tcpstr17;
 program tcpstr17;
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstr18.pp

@@ -6,7 +6,7 @@ program tcpstr18;
   {$codepage cp866}
   {$codepage cp866}
 {$endif}
 {$endif}
 
 
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstr19.pp

@@ -6,7 +6,7 @@ program tcpstr19;
 // this test can be only run with the compiler built right now on the
 // this test can be only run with the compiler built right now on the
 // same system
 // same system
 
 
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstr27.pp

@@ -1,4 +1,4 @@
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstr9.pp

@@ -1,5 +1,5 @@
 { %skiptarget=android }
 { %skiptarget=android }
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstransistr2shortstring.pp

@@ -1,5 +1,5 @@
 {$apptype console}
 {$apptype console}
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstransistr2widechararray.pp

@@ -1,4 +1,4 @@
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstransistr2widechararray2.pp

@@ -4,7 +4,7 @@
   DefaultSystemCodePage before calling widestringmanager.ansi2widemoveproc
   DefaultSystemCodePage before calling widestringmanager.ansi2widemoveproc
 }
 }
 
 
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstransistrcompare.pp

@@ -1,4 +1,4 @@
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstransistrcompareequal.pp

@@ -1,4 +1,4 @@
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstransistrcopy.pp

@@ -1,4 +1,4 @@
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstrchar2ansistr.pp

@@ -1,4 +1,4 @@
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstrconcat.pp

@@ -1,5 +1,5 @@
 {$APPTYPE CONSOLE}
 {$APPTYPE CONSOLE}
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstrconcat2.pp

@@ -1,5 +1,5 @@
 {$APPTYPE CONSOLE}
 {$APPTYPE CONSOLE}
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstrconcat3.pp

@@ -1,5 +1,5 @@
 {$APPTYPE CONSOLE}
 {$APPTYPE CONSOLE}
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstrconcatmulti.pp

@@ -1,6 +1,6 @@
 {$APPTYPE CONSOLE}
 {$APPTYPE CONSOLE}
 // test "fpc_AnsiStr_Concat_multi" with a same type(same encoding) 
 // test "fpc_AnsiStr_Concat_multi" with a same type(same encoding) 
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstrconcatmulti2.pp

@@ -1,6 +1,6 @@
 {$APPTYPE CONSOLE}
 {$APPTYPE CONSOLE}
 // test "fpc_AnsiStr_Concat_multi" with a differant types(encodings) 
 // test "fpc_AnsiStr_Concat_multi" with a differant types(encodings) 
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstrpchar2ansistr.pp

@@ -1,4 +1,4 @@
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstrsetlength.pp

@@ -1,4 +1,4 @@
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstrsetlength2.pp

@@ -1,4 +1,4 @@
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tcpstrshortstr2ansistr.pp

@@ -1,5 +1,5 @@
 {$mode objfpc} {$H+}
 {$mode objfpc} {$H+}
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tunistr1.pp

@@ -1,4 +1,4 @@
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tunistr2.pp

@@ -1,4 +1,4 @@
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tunistr4.pp

@@ -3,7 +3,7 @@
 {$mode objfpc}
 {$mode objfpc}
 {$endif fpc}
 {$endif fpc}
 
 
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tunistr6.pp

@@ -1,6 +1,6 @@
 {%skiptarget=wince}
 {%skiptarget=wince}
 {$codepage utf-8}
 {$codepage utf-8}
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/tunistr7.pp

@@ -1,6 +1,6 @@
 {$codepage utf-8}
 {$codepage utf-8}
 
 
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/twide1.pp

@@ -1,4 +1,4 @@
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/twide2.pp

@@ -1,4 +1,4 @@
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/twide3.pp

@@ -5,7 +5,7 @@
 {$codepage utf-8}
 {$codepage utf-8}
 
 
 {$mode objfpc}
 {$mode objfpc}
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/twide4.pp

@@ -3,7 +3,7 @@
 {$mode objfpc}
 {$mode objfpc}
 {$endif fpc}
 {$endif fpc}
 
 
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/twide6.pp

@@ -1,7 +1,7 @@
 {%skiptarget=wince}
 {%skiptarget=wince}
 {$codepage utf-8}
 {$codepage utf-8}
 
 
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/twide7.pp

@@ -1,6 +1,6 @@
 {$codepage utf-8}
 {$codepage utf-8}
 
 
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/twrstr9.pp

@@ -1,6 +1,6 @@
 {$codepage utf8}
 {$codepage utf8}
 
 
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/units/strutils/tstrutils1.pp

@@ -4,7 +4,7 @@ program tstrutils1;
 
 
 {$mode objfpc}
 {$mode objfpc}
 {$h+}
 {$h+}
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/units/strutils/tstrutils2.pp

@@ -1,7 +1,7 @@
 {$codepage utf8}
 {$codepage utf8}
 program tstrutils2;
 program tstrutils2;
 
 
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/units/system/tdir2.pp

@@ -13,7 +13,7 @@ Program tdir;
 {$codepage utf-8}
 {$codepage utf-8}
 {$I-}
 {$I-}
 
 
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

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

@@ -1,7 +1,7 @@
 {$codepage utf8}
 {$codepage utf8}
 {$mode objfpc}{$h+}
 {$mode objfpc}{$h+}
 
 
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/units/sysutils/tastrcmp.pp

@@ -24,7 +24,7 @@
 {$mode delphi}
 {$mode delphi}
 {$endif fpc}
 {$endif fpc}
 
 
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/units/sysutils/tfexpand2.pp

@@ -22,7 +22,7 @@ program TFExpand;
 {$DEFINE DEBUG}
 {$DEFINE DEBUG}
 (* Defining DEBUG causes all the source and target strings *)
 (* Defining DEBUG causes all the source and target strings *)
 (* to be written to the console to make debugging easier.  *)
 (* to be written to the console to make debugging easier.  *)
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/units/sysutils/tffirst.pp

@@ -2,7 +2,7 @@
 
 
 {$codepage utf8}
 {$codepage utf8}
 
 
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

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

@@ -1,6 +1,6 @@
 { %interactive }
 { %interactive }
 
 
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/units/sysutils/tstrcmp.pp

@@ -23,7 +23,7 @@
 {$ifdef fpc}
 {$ifdef fpc}
 {$mode delphi}
 {$mode delphi}
 {$endif fpc}
 {$endif fpc}
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/units/sysutils/tunifile.pp

@@ -1,7 +1,7 @@
 {$codepage utf8}
 {$codepage utf8}
 {$mode objfpc}{$h+}
 {$mode objfpc}{$h+}
 
 
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}
 
 

+ 1 - 1
tests/test/units/sysutils/twstrcmp.pp

@@ -25,7 +25,7 @@
 {$modeswitch unicodestrings}
 {$modeswitch unicodestrings}
 {$endif fpc}
 {$endif fpc}
 
 
-{$ifdef go32v2}
+{$if defined(go32v2) or defined(wasi)}
   {$define USE_INTERNAL_UNICODE}
   {$define USE_INTERNAL_UNICODE}
 {$endif}
 {$endif}