+ extended test to test main program as well

git-svn-id: trunk@11009 -
This commit is contained in:
florian 2008-05-18 18:41:08 +00:00
parent 4f7a6bb637
commit 605582a3ed

View File

@ -1,4 +1,8 @@
{ %opt=-gl }
{$goto on}
{ test lineinfo in libraries }
{$ifdef unix}
uses
dl;
@ -10,11 +14,24 @@ var
s1,s2 : string;
l : longint;
a : pointer;
label
w;
begin
w:
{ library }
p(a);
GetLineInfo(PtrUInt(a),s1,s2,l);
writeln('Func: ',s1,' Source: ',s2,' Line: ',l);
if (s1<>'P') or (s2<>'tlib1a.pp') or (l<>9) then
writeln({ 'Func: ',s1,'} 'Source: ',s2,' Line: ',l);
{ GetLineInfo of dwarf doesn't return the function name }
if { (s1<>'P') or } (s2<>'tlib1a.pp') or (l<>9) then
halt(1);
{ main program }
GetLineInfo(PtrUInt(@w),s1,s2,l);
writeln({ 'Func: ',s1,'} 'Source: ',s2,' Line: ',l);
{ GetLineInfo of dwarf doesn't return the function name }
if { (s1<>'P') or } (s2<>'tlib1.pp') or (l<>19) then
halt(1);
writeln('ok');
end.