| | .ds CP 2003-2004 |
---|
| | .TH test-tc 1 "TundraWare Inc." |
---|
| | |
---|
| | .SH NAME test-tc.py |
---|
| | Test driver to exercise the \'tconfpy\' Python module. |
---|
| | Test driver to exercise the \fCtconfpy\fP Python module. |
---|
| | |
---|
| | |
---|
| | .SH SYNOPSIS |
---|
| | test-tc.py [symtbl] [nonewvar] [limitns] [litvars] [debug] cfgfile, cfgfile, ... |
---|
| | test-tc.py [symtbl] [nonewvars] [templates] [temponly] [limitns] [litvars] [debug] cfgfile, cfgfile, ... |
---|
| | |
---|
| | .SH OPTIONS |
---|
| | .TP |
---|
| | .B symtbl |
---|
| | |
---|
| | This option causes the test driver to include a symbol table with some |
---|
| | predefined test variables in it. These are useful for experimenting |
---|
| | with variable dereferencing, substitution, and type/value enforcement. |
---|
| | |
---|
| | The default is to not predefine any such variables. (Note that whether |
---|
| | this option is present or not, \'tconfpy\' always creates a number of |
---|
| | predefined variables of its own internally. See the \'tconfpy\' |
---|
| | documentation for the details.) |
---|
| | this option is present or not, \fCtconfpy\fP always creates a number of |
---|
| | predefined variables of its own internally. See the \fCtconfpy\fP |
---|
| | documentation for the details.) |
---|
| | |
---|
| | You can see all the predefined variables (and their attributes) by |
---|
| | running \fCtest-tc.py\fP on an empty configuration file. This will |
---|
| | show you both the variables automatically defined by \fCtconfpy\fP as |
---|
| | well as any variables created with this option, if present. |
---|
| | |
---|
| | .TP |
---|
| | .B nonewvar |
---|
| | .B nonewvars |
---|
| | This option disables the creation of new variables in the |
---|
| | configuration file (via the \fCAllowNewVars\fP API option). The user |
---|
| | is limited to referencing and modifying only those variables already |
---|
| | present in the symbol table. Typically used when passing an initial |
---|
| | symbol table to the parser to limit the user to only those variables. |
---|
| | The default is to permit new variable creation. |
---|
| | |
---|
| | This option tells \'tconfpy\' to disallow the creation of new |
---|
| | variables in the configuration file (via the \'AllowNewVars\' API |
---|
| | option). The user is limited to referencing and modifying only those |
---|
| | variables already present in the symbol table. Typically used when |
---|
| | passing an initial symbol table to the parser to limit the user to |
---|
| | only those variables. The default is to permit new variable creation. |
---|
| | .TP |
---|
| | .B templates |
---|
| | This option creates a default set of variable templates for use in |
---|
| | the configuration file. These are passed to the \fCtconfpy\fP parser |
---|
| | via the \fCTemplates={}\fP API option. |
---|
| | |
---|
| | The following variable templates are predefined when this option |
---|
| | is used: |
---|
| | |
---|
| | .ft C \" courier |
---|
| | .nf |
---|
| | |
---|
| | |
---|
| | Name Val RO Type Def Legal Values Min/Max |
---|
| | -------------------------------------------------------------------------- |
---|
| | |
---|
| | templb 1 RW boolean False [] None None |
---|
| | templc 4+5j RW complex 0-0j [1-1j, 1+1j] None None |
---|
| | templf 1.0 RW float 0.5 [3.14, 2.73] None None |
---|
| | templi 1 RW int 0 [1, 2, 23] None None |
---|
| | templs "stringy" RW string "" [r'^box$', r'^Bax', r'a+bc'] 3 8 |
---|
| | .fi |
---|
| | .ft \" revert |
---|
| | |
---|
| | |
---|
| | |
---|
| | .TP |
---|
| | .B temponly |
---|
| | This option will only permit new variable creation if a template for |
---|
| | that variable exists (via the \fCTemplatesOnly=True\fP parser API |
---|
| | option). This is used in conjunction with the \fCtemplates\fP option |
---|
| | above. |
---|
| | |
---|
| | .TP |
---|
| | .B limitns |
---|
| | |
---|
| |
---|
| | |
---|
| | .TP |
---|
| | .B litvars |
---|
| | |
---|
| | By default, \'tconfpy\' does nothing to text encountered inside |
---|
| | of \'.literal\' blocks in a configuration file. If this option |
---|
| | is present, the test driver tells \'tconfpy\' to replace any variable |
---|
| | references present in a \'.literal\' block. See the \'tconfpy\' |
---|
| | By default, \fCtconfpy\fP does nothing to text encountered inside |
---|
| | of \fC.literal\fP blocks in a configuration file. If this option |
---|
| | is present, the test driver tells \fCtconfpy\fP to replace any variable |
---|
| | references present in a \fC.literal\fP block. See the \fCtconfpy\fP |
---|
| | documentation for a more complete description. |
---|
| | |
---|
| | .TP |
---|
| | .B debug |
---|
| | |
---|
| | This option causes the test driver to invoke \'tconfpy\' with |
---|
| | This option causes the test driver to invoke \fCtconfpy\fP with |
---|
| | debugging enabled and then display debug output when parsing is |
---|
| | complete. The default is for debug output to be disabled. |
---|
| | |
---|
| | |
---|
| | .SH ADDING OR CHANGING PRE-DEFINED VARIABLES IN THE TEST DRIVER |
---|
| | .SH ADDING OR CHANGING PREDEFINED VARIABLES IN THE TEST DRIVER |
---|
| | |
---|
| | This test driver uses a simple table-driven scheme for pre-defining |
---|
| | This test driver uses a simple table-driven scheme for predefining |
---|
| | variables should you desire this feature. This can be found near |
---|
| | the beginning of the \'test-tc.py\' file. All this should be |
---|
| | the beginning of the \fCtest-tc.py\fP file. All this should be |
---|
| | fairly self-explanatory once you understand the various variable |
---|
| | attributes recognized by \'tconfpy\'. Edit this table as |
---|
| | attributes recognized by \fCtconfpy\fP. Edit this table as |
---|
| | desired to create more variables or different attribute values |
---|
| | for your testing purposes. |
---|
| | |
---|
| | The exact same scheme is used for predefining variable templates and |
---|
| | you can add/delete/change these to suit your own tastes in the same |
---|
| | way. |
---|
| | |
---|
| | .SH OTHER |
---|
| | Requires Python 2.3 or later. |
---|
| | |
---|
| | .SH BUGS AND MISFEATURES |
---|
| | The symbol table dump at the end of a program run could be formatted better. |
---|
| | |
---|
| | .SH COPYRIGHT AND LICENSING |
---|
| | \'test-tc\' is part of the \'tconfpy\' package and is Copyright (c) |
---|
| | \fCtest-tc\fP is part of the \fCtconfpy\fP package and is Copyright (c) |
---|
| | \*(CP TundraWare Inc. For terms of use, see the tconfpy-license.txt |
---|
| | file in the program distribution. If you install \'tconfpy\' on a |
---|
| | file in the program distribution. If you install \fCtconfpy\fP on a |
---|
| | FreeBSD system using the 'ports' mechanism, you will also find this |
---|
| | file in /usr/local/share/doc/py-tconfpy. |
---|
| | |
---|
| | .SH AUTHOR |
---|
| |
---|
| | |