mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 17:19:32 +02:00
+ extended test to test main program as well
git-svn-id: trunk@11009 -
This commit is contained in:
parent
4f7a6bb637
commit
605582a3ed
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user