mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 13:39:30 +02:00
codetools: completeblock test result
git-svn-id: trunk@21336 -
This commit is contained in:
parent
2c2fb53b25
commit
4a05e3f8e0
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -168,6 +168,7 @@ components/codetools/examples/testscompleteblock/caseend1.inc svneol=native#text
|
||||
components/codetools/examples/testscompleteblock/class1.inc svneol=native#text/plain
|
||||
components/codetools/examples/testscompleteblock/ifbegin1.inc svneol=native#text/plain
|
||||
components/codetools/examples/testscompleteblock/ifbeginelse1.inc svneol=native#text/plain
|
||||
components/codetools/examples/testscompleteblock/ifbeginelse1_result.inc svneol=native#text/plain
|
||||
components/codetools/examples/testscompleteblock/procedurebegin1.inc svneol=native#text/plain
|
||||
components/codetools/examples/testscompleteblock/procedurebeginend1.inc svneol=native#text/plain
|
||||
components/codetools/examples/testscompleteblock/procedurebeginifbegin1.inc svneol=native#text/plain
|
||||
|
@ -45,7 +45,7 @@ begin
|
||||
Defines:=TStringList.Create;
|
||||
try
|
||||
if Paramcount>0 then begin
|
||||
if Paramcount<>4 then begin
|
||||
if Paramcount<4 then begin
|
||||
writeln('Usage: '+ParamStrUTF8(0)+' filename line column define1 define2');
|
||||
exit;
|
||||
end;
|
||||
@ -79,17 +79,21 @@ begin
|
||||
end;
|
||||
CodeToolBoss.DefineTree.Add(DirDef);
|
||||
|
||||
writeln('StartFile=',Code.Filename);
|
||||
writeln('StartX=',X);
|
||||
writeln('StartY=',Y);
|
||||
if Defines.IndexOf('fpcunit')<0 then begin
|
||||
writeln('StartFile=',Code.Filename);
|
||||
writeln('StartX=',X);
|
||||
writeln('StartY=',Y);
|
||||
end;
|
||||
if not CodeToolBoss.CompleteBlock(Code,X,Y,NewCode,NewX,NewY,NewTopLine) then begin
|
||||
writeln('ERROR: complete block failed at ',Code.Filename,' X=',X,' Y=',Y);
|
||||
exit;
|
||||
end;
|
||||
writeln('File=',NewCode.Filename);
|
||||
writeln('X=',NewX);
|
||||
writeln('Y=',NewY);
|
||||
writeln('TopLine=',NewTopLine);
|
||||
if Defines.IndexOf('fpcunit')<0 then begin
|
||||
writeln('File=',NewCode.Filename);
|
||||
writeln('X=',NewX);
|
||||
writeln('Y=',NewY);
|
||||
writeln('TopLine=',NewTopLine);
|
||||
end;
|
||||
writeln(NewCode.Source);
|
||||
finally
|
||||
Defines.Free;
|
||||
|
@ -0,0 +1,14 @@
|
||||
{%MainUnit unit1.pas}
|
||||
procedure Do1;
|
||||
begin
|
||||
if True then
|
||||
begin
|
||||
Test() //caret position
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user