Unit ok_expanding_descriptions

Description
Uses
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Constants
Variables

Description

This is a test of tags expanded by TPasItem handlers. Of course with @abstract tag using some recursive tag: See also TestPasMethodTags

This whole unit is actually a big test of many things related to pasdoc's @-tags.

See also TMyClass for other test of @cvs tag (with $Date, as an alternative specification of @lastmod)

Overview

Classes, Interfaces, Objects and Records

Name Description
Class EFoo  
Class EBar  
Class EXyz  
Class TMyClassAncestor  
Class TMyClass  

Functions and Procedures

procedure RecursiveTwoAt;
procedure TestHtmlAndLatexTags;
procedure TestLongCode;
function TestPasMethodTags(A, B: Integer): string;
procedure TestRecursiveTag;
procedure TwoAt;

Description

Functions and Procedures

procedure RecursiveTwoAt;

aa aaaaa aa aaa SHGetSpecialFolderPath(0, @Path, CSIDL_APPDATA, true) aaaa aaaaaa aaaaaa aaaaaaaaa aaaa

At some point, this test caused the bug: final </code> tag was inserted in converted form (processed with ConvertString) into html output. In effect, there was an opening <code> tag but there was no closing </code> tag.

procedure TestHtmlAndLatexTags;

This is some dummy html code, just to show that inside @html tag of pasdoc (note that I used single @ char in this sentence) nothing is expanded by pasdoc. No paragraphs are created by pasdoc. (This text is still in the 1st, not in the 2nd, paragraph in html output)

You must explicitly write <p> to get paragraph. No tags work, e.g. @link(TestLongCode).

Note that text inside @html / @latex tags is absolutely not touched by pasdoc. Characters are not escaped (< is *not* changed to &lt; in the html case), @tags are not expanded, @ needs not to be doubled, paragraphs (<p> in the html case) are not inserted.

procedure TestLongCode;

Note that inside @longcode below I should be able to write singe @ char to get it in the output, no need to double it (like @@). No tags are expanded inside longcode.

Also note that paragraphs are not expanded inside longcode (no <p> inside <pre>...</pre> in html output).

Of course html characters are still correctly escaped (< changes to &lt; etc.).


procedure Foo;
begin
  if A < B then Bar; { @link(No, this is not really pasdoc tag) }
end;

procedure Bar(X: Integer);
begin
  CompareMem(@X, @Y);
end;

function TestPasMethodTags(A, B: Integer): string;

This is a test of tags expanded by TPasMethod handlers. Note that all three tags are expanded recursively.

Parameters
A
means sthg about TestRecursiveTag
B
also means sthg. Code inside.
Returns

You can make tags recursion any level deep : This is a code with a link to TestRecursiveTag

Exceptions raised
EFoo
when you do sthg nasty, like call TestRecursiveTag when you're not supposed to
EBar
when code if 1 = 0 then DoSomething; will work as expected.
procedure TestRecursiveTag;

@code and @returns (and some others) tags are recursive, you can freely put other tags inside.

This is link to TestHtmlAndLatexTags.

Exceptions raised
EFoo
in case TestHtmlAndLatexTags returns value >= 4 (actually, this is just a test text).
procedure TwoAt;

Write two at chars, like this @@, to get one @ in output.

E.g. @ link(TSomeClass).

E.g. @link(TSomeClass).

E.g. @html foobar.

E.g. @link .

Authors

Created

2005-03-30

Last Modified

2005-03-30