C test script language reference

Component Testing for C uses its own simple language for test scripting.

This section describes each keyword of the C test script language, including:

  • Syntax

  • Functionality and rules governing its usage

  • Examples of use

Notation conventions

Throughout this guide, command notation and argument parameters use the following standard convention:

Notation Example Meaning
BOLD BEGIN Language keyword
<italic> <filename> Symbolic variables
[ ] [ <option> ] Optional items
{ } { <filenames> } Series of values
[{ }] [{ <filenames> } ] Optional series of variables
| on|off OR operator

C test script keywords are case insensitive. This means that STUB, stub, and Stub are interpreted the same way. The keyword others is an exception, and must always be expressed in lower case.

For conventional purposes however, this document uses upper-case notation for the C test script keywords in order to differentiate from native source code.

Split statements

C test script statements may be split over several lines in a .ptu test script. Continued lines must start with the ampersand ('&') symbol to be recognized as a continuation of the previous line. No tabs or spaces should precede the ampersand.

Statements must be shorter than 2048 characters, although this limit may be lower on some platforms.

Language identifiers

A C test script identifier is a text string used as a label, such as the name of a TEST or a STUB in a .ptu test script.

Identifiers are made of an unlimited sequence of the following characters:

  • a-z

  • A-Z

  • 0-9

  • _ (underscore)

Spaces are not valid identifier characters.

Note that identifiers starting with a numeric character are allowed. The following statement, for example, is syntactically correct:

TEST 1

...

END TEST

C test script identifiers are case sensitive. This means that LABEL, label, and Label are three different identifiers.