| |
---|
| | # test-tc.py - A Test Driver For The 'tconfpy' Configuration File Parser |
---|
| | # Copyright (c) 2003-2004 TundraWare Inc. All Rights Reserved. |
---|
| | |
---|
| | PROGNAME = "tconfpy Test Driver" |
---|
| | RCSID = "$Id: test-tc.py,v 1.126 2004/04/02 09:30:10 tundra Exp $" |
---|
| | RCSID = "$Id: test-tc.py,v 1.127 2004/04/07 00:09:48 tundra Exp $" |
---|
| | VERSION = RCSID.split()[2] |
---|
| | |
---|
| | # Copyright Information |
---|
| | |
---|
| |
---|
| | # Make sure we got legit arguments |
---|
| | |
---|
| | if len(sys.argv) < 2: |
---|
| | print BANNER |
---|
| | print "Usage: test-tc.py [symtbl] [debug] [litvars] file file ..." |
---|
| | print "Usage: test-tc.py [symtbl] [nonew] [debug] [litvars] file file ..." |
---|
| | sys.exit(1) |
---|
| | |
---|
| | # Process all the requested configuration files, |
---|
| | # dumping the what tconfpy returns for each one. |
---|
| | |
---|
| | ALLOW = True |
---|
| | DEBUG = False |
---|
| | LITVARS = False |
---|
| | |
---|
| | |
---|
| |
---|
| | LITVARS = True |
---|
| | |
---|
| | elif fn == "symtbl": |
---|
| | st = symtbl |
---|
| | |
---|
| | elif fn == "nonew": |
---|
| | ALLOW = False |
---|
| | |
---|
| | # Everything else presumed to be a configuration file |
---|
| | else: |
---|
| | |
---|
| | retval = ParseConfig(fn, st, Debug=DEBUG, LiteralVars=LITVARS) |
---|
| | retval = ParseConfig(fn, st, AllowNewVars=ALLOW, Debug=DEBUG, LiteralVars=LITVARS) |
---|
| | |
---|
| | if retval.Errors: |
---|
| | print "Errors Were Found In '%s'!" % fn |
---|
| | else: |
---|
| |
---|
| | |