mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 08:21:10 +02:00
codetools: added test for find declaration and missing closing bracket
git-svn-id: trunk@57197 -
This commit is contained in:
parent
ea53266129
commit
4b3152e0d4
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="10"/>
|
||||
<Version Value="11"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<MainUnitHasCreateFormStatements Value="False"/>
|
||||
@ -25,9 +25,10 @@
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="1">
|
||||
<Mode0 Name="default"/>
|
||||
</Modes>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
|
@ -100,6 +100,7 @@ type
|
||||
procedure TestFindDeclaration_Arrays;
|
||||
procedure TestFindDeclaration_GuessType;
|
||||
procedure TestFindDeclaration_Attributes;
|
||||
procedure TestFindDeclaration_BracketOpen;
|
||||
// test all files in directories:
|
||||
procedure TestFindDeclaration_FPCTests;
|
||||
procedure TestFindDeclaration_LazTests;
|
||||
@ -901,6 +902,29 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TTestFindDeclaration.TestFindDeclaration_BracketOpen;
|
||||
begin
|
||||
StartProgram;
|
||||
Add([
|
||||
'var c: integer;',
|
||||
'procedure DoIt(i: integer);',
|
||||
' procedure WriteStr(s: string);',
|
||||
' begin',
|
||||
' end;',
|
||||
'begin',
|
||||
' begin',
|
||||
' DoIt(c{declaration:c}',
|
||||
' end;',
|
||||
' begin',
|
||||
' WriteStr(c{declaration:c}',
|
||||
' end;',
|
||||
'end;',
|
||||
'begin',
|
||||
'end.',
|
||||
'']);
|
||||
FindDeclarations(Code);
|
||||
end;
|
||||
|
||||
procedure TTestFindDeclaration.TestFindDeclaration_FPCTests;
|
||||
begin
|
||||
TestFiles('fpctests');
|
||||
|
Loading…
Reference in New Issue
Block a user