Browse Source

pastojs: added test for utf-16 surrogates

mattias 1 year ago
parent
commit
6bb5c3c48c
1 changed files with 3 additions and 1 deletions
  1. 3 1
      packages/pastojs/tests/tcmodules.pas

+ 3 - 1
packages/pastojs/tests/tcmodules.pas

@@ -8847,6 +8847,7 @@ begin
   '  s: string;',
   '  s: string;',
   'begin',
   'begin',
   '  s:=''😊'';', // 1F60A
   '  s:=''😊'';', // 1F60A
+  '  s:=''Hello ''#55357#56841', // #$D83D#$DE09
   '']);
   '']);
   ConvertProgram;
   ConvertProgram;
   CheckSource('TestStringConstSurrogate',
   CheckSource('TestStringConstSurrogate',
@@ -8854,7 +8855,8 @@ begin
     'this.s="";'
     'this.s="";'
     ]),
     ]),
     LinesToStr([
     LinesToStr([
-    '$mod.s="😊";'
+    '$mod.s="😊";',
+    '$mod.s="Hello 😉";'
     ]));
     ]));
 end;
 end;