From fba0c4d0349fa0c9127663a128cc0cbbd9ebcb7b Mon Sep 17 00:00:00 2001 From: mattias Date: Sat, 15 Jul 2023 11:04:18 +0200 Subject: [PATCH] codetools: fixed two tests (cherry picked from commit 9d18e66aa8d7b171f0a35d9d0916d57511804cc9) --- components/codetools/tests/testdesignerformtools.pas | 8 ++++---- components/codetools/tests/testfinddeclaration.pas | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/components/codetools/tests/testdesignerformtools.pas b/components/codetools/tests/testdesignerformtools.pas index 986725dcd8..faa9e2a3c6 100644 --- a/components/codetools/tests/testdesignerformtools.pas +++ b/components/codetools/tests/testdesignerformtools.pas @@ -305,7 +305,7 @@ begin ,' end;' ,'implementation' ,'end.'], - ['Button1:Dsgn_AmbigBearBtn.TBearButton'] + ['Button1:Dsgn_AmbigBearBtn/TBearButton'] ); end; @@ -325,9 +325,9 @@ begin ,' end;' ,'implementation' ,'end.'], - ['Button1:Dsgn_AmbigBearBtn.TBearButton', - 'Button2:Dsgn_BearButtons.TBearButton', - 'Label1:Dsgn_BearControls.TBearLabel'] + ['Button1:Dsgn_AmbigBearBtn/TBearButton', + 'Button2:Dsgn_BearButtons/TBearButton', + 'Label1:Dsgn_BearControls/TBearLabel'] ); end; diff --git a/components/codetools/tests/testfinddeclaration.pas b/components/codetools/tests/testfinddeclaration.pas index 979dd0c226..a34faead07 100644 --- a/components/codetools/tests/testfinddeclaration.pas +++ b/components/codetools/tests/testfinddeclaration.pas @@ -317,8 +317,10 @@ begin while (IdentifierEndPos>1) and (IsSpaceChar[Src[IdentifierEndPos-1]]) do dec(IdentifierEndPos); IdentifierStartPos:=IdentifierEndPos; - // allow after . (for completion) - if not ((IdentifierStartPos>1) and (Src[IdentifierStartPos-1]='.')) then begin + if (IdentifierStartPos>1) and (Src[IdentifierStartPos-1]='.') then begin + // .{...} for completion + end else begin + // check identifier in front of comment while (IdentifierStartPos>1) and (IsIdentChar[Src[IdentifierStartPos-1]]) do dec(IdentifierStartPos); if IdentifierStartPos=p then begin