mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 17:19:19 +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/class1.inc svneol=native#text/plain
|
||||||
components/codetools/examples/testscompleteblock/ifbegin1.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.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/procedurebegin1.inc svneol=native#text/plain
|
||||||
components/codetools/examples/testscompleteblock/procedurebeginend1.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
|
components/codetools/examples/testscompleteblock/procedurebeginifbegin1.inc svneol=native#text/plain
|
||||||
|
@ -45,7 +45,7 @@ begin
|
|||||||
Defines:=TStringList.Create;
|
Defines:=TStringList.Create;
|
||||||
try
|
try
|
||||||
if Paramcount>0 then begin
|
if Paramcount>0 then begin
|
||||||
if Paramcount<>4 then begin
|
if Paramcount<4 then begin
|
||||||
writeln('Usage: '+ParamStrUTF8(0)+' filename line column define1 define2');
|
writeln('Usage: '+ParamStrUTF8(0)+' filename line column define1 define2');
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -79,17 +79,21 @@ begin
|
|||||||
end;
|
end;
|
||||||
CodeToolBoss.DefineTree.Add(DirDef);
|
CodeToolBoss.DefineTree.Add(DirDef);
|
||||||
|
|
||||||
writeln('StartFile=',Code.Filename);
|
if Defines.IndexOf('fpcunit')<0 then begin
|
||||||
writeln('StartX=',X);
|
writeln('StartFile=',Code.Filename);
|
||||||
writeln('StartY=',Y);
|
writeln('StartX=',X);
|
||||||
|
writeln('StartY=',Y);
|
||||||
|
end;
|
||||||
if not CodeToolBoss.CompleteBlock(Code,X,Y,NewCode,NewX,NewY,NewTopLine) then begin
|
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);
|
writeln('ERROR: complete block failed at ',Code.Filename,' X=',X,' Y=',Y);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
writeln('File=',NewCode.Filename);
|
if Defines.IndexOf('fpcunit')<0 then begin
|
||||||
writeln('X=',NewX);
|
writeln('File=',NewCode.Filename);
|
||||||
writeln('Y=',NewY);
|
writeln('X=',NewX);
|
||||||
writeln('TopLine=',NewTopLine);
|
writeln('Y=',NewY);
|
||||||
|
writeln('TopLine=',NewTopLine);
|
||||||
|
end;
|
||||||
writeln(NewCode.Source);
|
writeln(NewCode.Source);
|
||||||
finally
|
finally
|
||||||
Defines.Free;
|
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