mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-28 21:20:29 +02:00
parent
68c109035c
commit
5ef774f6ab
@ -590,13 +590,12 @@ begin
|
|||||||
While I<=L do
|
While I<=L do
|
||||||
begin
|
begin
|
||||||
c:=S[I];
|
c:=S[I];
|
||||||
if (c in [#0..#31,'"','''','/','\'])
|
if (c in [#0..#31,'"','''','\'])
|
||||||
or (c>=#$ff00) or ((c>=#$D800) and (c<=#$DFFF)) then
|
or (c>=#$ff00) or ((c>=#$D800) and (c<=#$DFFF)) then
|
||||||
begin
|
begin
|
||||||
R:=R+Copy(S,J,I-J);
|
R:=R+Copy(S,J,I-J);
|
||||||
Case c of
|
Case c of
|
||||||
'\' : R:=R+'\\';
|
'\' : R:=R+'\\';
|
||||||
'/' : R:=R+'\/';
|
|
||||||
'"' : if Quote=jseqSingle then R:=R+'"' else R:=R+'\"';
|
'"' : if Quote=jseqSingle then R:=R+'"' else R:=R+'\"';
|
||||||
'''': if Quote=jseqDouble then R:=R+'''' else R:=R+'\''';
|
'''': if Quote=jseqDouble then R:=R+'''' else R:=R+'\''';
|
||||||
#0..#7,#11,#14..#31: R:=R+'\x'+TJSString(hexStr(ord(c),2));
|
#0..#7,#11,#14..#31: R:=R+'\x'+TJSString(hexStr(ord(c),2));
|
||||||
|
@ -2638,7 +2638,7 @@ Var
|
|||||||
begin
|
begin
|
||||||
L:=TJSLiteral.Create(0,0,'');
|
L:=TJSLiteral.Create(0,0,'');
|
||||||
L.Value.AsString:='ab/cd';
|
L.Value.AsString:='ab/cd';
|
||||||
AssertWrite('ab/cd','"ab\/cd"',L);
|
AssertWrite('ab/cd','"ab/cd"',L);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Procedure TTestLiteralWriter.TestStringsBack;
|
Procedure TTestLiteralWriter.TestStringsBack;
|
||||||
|
@ -493,7 +493,7 @@ type
|
|||||||
Procedure TestArray_SetLengthMultiDim;
|
Procedure TestArray_SetLengthMultiDim;
|
||||||
Procedure TestArray_SetLengthDynOfStatic;
|
Procedure TestArray_SetLengthDynOfStatic;
|
||||||
Procedure TestArray_OpenArrayOfString;
|
Procedure TestArray_OpenArrayOfString;
|
||||||
Procedure TestArray_ArrayOfCharAssignString; // ToDo
|
Procedure TestArray_ArrayOfCharAssignString;
|
||||||
Procedure TestArray_ConstRef;
|
Procedure TestArray_ConstRef;
|
||||||
Procedure TestArray_Concat;
|
Procedure TestArray_Concat;
|
||||||
Procedure TestArray_Copy;
|
Procedure TestArray_Copy;
|
||||||
@ -961,8 +961,6 @@ type
|
|||||||
Procedure TestLibrary_Export_Index_Fail;
|
Procedure TestLibrary_Export_Index_Fail;
|
||||||
Procedure TestLibrary_ExportVar;
|
Procedure TestLibrary_ExportVar;
|
||||||
Procedure TestLibrary_ExportUnitFunc;
|
Procedure TestLibrary_ExportUnitFunc;
|
||||||
// ToDo: test delayed specialization init
|
|
||||||
// ToDo: shortrefoptimization
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function LinesToStr(Args: array of const): string;
|
function LinesToStr(Args: array of const): string;
|
||||||
@ -7247,6 +7245,7 @@ end;
|
|||||||
procedure TTestModule.TestSet_AnonymousEnumTypeChar;
|
procedure TTestModule.TestSet_AnonymousEnumTypeChar;
|
||||||
begin
|
begin
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
StartProgram(false);
|
StartProgram(false);
|
||||||
Add([
|
Add([
|
||||||
'type',
|
'type',
|
||||||
@ -8649,7 +8648,7 @@ begin
|
|||||||
' s:=concat(s,''a'',s);',
|
' s:=concat(s,''a'',s);',
|
||||||
' s:=#250#269;',
|
' s:=#250#269;',
|
||||||
' i:=low(s)+high(a);',
|
' i:=low(s)+high(a);',
|
||||||
//' s:=#$2F804;',
|
' s:=''a/b'';',
|
||||||
// ToDo: \uD87E\uDC04 -> \u{2F804}
|
// ToDo: \uD87E\uDC04 -> \u{2F804}
|
||||||
'']);
|
'']);
|
||||||
ConvertProgram;
|
ConvertProgram;
|
||||||
@ -8684,6 +8683,7 @@ begin
|
|||||||
'$mod.s = $mod.s.concat("a", $mod.s);',
|
'$mod.s = $mod.s.concat("a", $mod.s);',
|
||||||
'$mod.s = "úč";',
|
'$mod.s = "úč";',
|
||||||
'$mod.i = 1 + $mod.a.length;',
|
'$mod.i = 1 + $mod.a.length;',
|
||||||
|
'$mod.s = "a/b";',
|
||||||
'']));
|
'']));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user