diff --git a/test-tc.py b/test-tc.py index a950056..f037d3c 100755 --- a/test-tc.py +++ b/test-tc.py @@ -2,7 +2,7 @@ # Copyright (c) 2003-2004 TundraWare Inc. All Rights Reserved. PROGNAME = "tconfpy Test Driver" -RCSID = "$Id: test-tc.py,v 1.119 2004/03/25 00:58:32 tundra Exp $" +RCSID = "$Id: test-tc.py,v 1.120 2004/03/25 10:38:04 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -103,7 +103,7 @@ for typ in ((tconfpy.TYPE_BOOL, True), (tconfpy.TYPE_COMPLEX, 0+0j), (tconfpy.TYPE_FLOAT, 0.00), (tconfpy.TYPE_INT, 0), - (tconfpy.TYPE_STRING, "")): + (tconfpy.TYPE_STRING, "astring")): if typ[0] == d.Type: d.Default = typ[1] @@ -111,16 +111,17 @@ # Load the table with this entry symtbl[sym] = d -symtbl["boo"].Writeable = False -symtbl["fox"].Min = -1 -symtbl["fox"].Max = 200 -symtbl["foo"].Min = -100 -symtbl["bar"].Min = 8 -symtbl["bar"].Max = 8 +# Put some values in for testing legal variables and bounds - - - +symtbl["foo"].LegalVals = [1,2, 23] +symtbl["foo"].Min = 1 +symtbl["foo"].Max = 30 +symtbl["fox"].LegalVals = [3.14, 34.0] +symtbl["fox"].Min = -1 +symtbl["fox"].Max = 300 +symtbl["bar"].LegalVals = [r'^foo$', r'a+'] # Add this to see regex error [r'ss^*'] +symtbl["bar"].Min = 2 +symtbl["bar"].Max = 8 # Here's a way to inherit the base symbol definition from # the module and then derive a new object type for your