INCLUDE

C Test Script Language

Syntax

INCLUDE CODE <file>

INCLUDE PTU <file>

Description

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

When an INCLUDE instruction is encountered, the C Test Script Compiler leaves the current file, and starts pre-processing the specified file. When this is done, the C 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 each line with a hash character ('#').

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

Associated Rules

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.

The instruction INCLUDE CODE <file> inserts the entire file into the generated source code. A workaround to this is to use the following line in C:

 ##include "<file>"

Example

INCLUDE CODE file1.c

INCLUDE CODE ../file2.c

INCLUDE PTU /usr/foo/test/file3.ptu