INCLUDE

Ada Test Script Language

Purpose

The INCLUDE statement specifies an external file for the Ada Test Script Compiler to process.

Syntax

INCLUDE CODE <file.ada>

INCLUDE PTU <file.ptu>

where:

  1. <file.ada> is the file name of an external Ada source file

    <file.ptu> is the file name of an Ada test script

Description

When an INCLUDE instruction is encountered, the Ada Test Script Compiler leaves the current file, and starts pre-processing the specified file. When this is done, the Ada Test Script Compiler returns to the current file at the point where it left.

Including a file with the additional keyword CODE lets you include a source file without having to start every line with a hash character ('#').

Including a file with the additional keyword PTU lets you include an Ada test script within another Ada test script. In this case, included .ptu test scripts must not contain BEGIN or HEADER statements.

The name of the included file can be specified with an absolute path or a path relative to the current directory.

If the file is not found in the current directory, all directories specified by the -incl option are searched when the preprocessor is started.

If it is still not found or if access is denied, an error is generated.

Example

INCLUDE CODE file1.ada

INCLUDE CODE ../file2.ada

INCLUDE PTU /usr/tests/file3.ptu