Browse Source

+ test for proper line info retrival from dlls/sos

git-svn-id: trunk@11007 -
florian 17 years ago
parent
commit
1fe749c90c
3 changed files with 38 additions and 0 deletions
  1. 2 0
      .gitattributes
  2. 20 0
      tests/test/tlib1.pp
  3. 16 0
      tests/test/tlib1a.pp

+ 2 - 0
.gitattributes

@@ -7477,6 +7477,8 @@ tests/test/tinterface5.pp svneol=native#text/plain
 tests/test/tinterrupt.pp svneol=native#text/plain
 tests/test/tintfdef.pp svneol=native#text/plain
 tests/test/tintuint.pp svneol=native#text/plain
+tests/test/tlib1.pp svneol=native#text/plain
+tests/test/tlib1a.pp svneol=native#text/plain
 tests/test/tlibrary1.pp svneol=native#text/plain
 tests/test/tlibrary2.pp svneol=native#text/plain
 tests/test/tlibrary3.pp svneol=native#text/plain

+ 20 - 0
tests/test/tlib1.pp

@@ -0,0 +1,20 @@
+{ %opt=-gl }
+{$ifdef unix}
+uses
+  dl;
+{$endif unix}
+
+procedure p(var a : pointer);external 'tlib1a' name 'p';
+
+var
+  s1,s2 : string;
+  l : longint;
+  a : pointer;
+begin
+  p(a);
+  GetLineInfo(PtrUInt(a),s1,s2,l);
+  writeln('Func: ',s1,' Source: ',s2,' Line: ',l);
+  if (s1<>'P') or (s2<>'tlib1a.pp') or (l<>7) then
+    halt(1);
+  writeln('ok');
+end.

+ 16 - 0
tests/test/tlib1a.pp

@@ -0,0 +1,16 @@
+{ %norun }
+{$goto on}
+library tlib1a;
+
+  procedure p(var a : pointer);
+    label
+      we;
+    begin
+    we:
+      a:=@we;
+    end;
+
+  exports p;
+
+begin
+end.