On 23.10.2007, at 19:25, Stephen Deasey wrote: > Two interesting failing test cases: > > > > test cfg-5.4 {defaults propagate to global store} -body { > ns_getconfig section cfg-5.4 foo > ns_getconfig section > } -match glob -result {*cfg-5.4*} > > ---- Result was: > cfg-4.1 cfg-3.2 cfg-4.2 cfg-3.1 > ---- Result should have been (glob matching): > *cfg-5.4* > ==== cfg-5.4 FAILED > >
This can happen if "cfg-5.4" was never declared. The "ns_getconfig section cfg-5.4 foo" will NOT trigger error if the section/key is missing. It will just return empty string (as ns_config does). Correspondingly, the "ns_getconfig section" will return just those keys that have been ns_setconfig'ed so far. > > > test cfg-4.1 {global type check bool} -body { > ns_setconfig section cfg-4.1 true > expr {[ns_getconfig -bool section cfg-4.1] ? 1 : 0} > } -result 1 > > ---- Test generated error; Return code was: 1 > ---- Return code should have been one of: 0 2 > ---- errorInfo: configuration parameter is not a boolean This is of course more tricky, as we do not store strings in Param, just 1/0. I think I must investigate string in Param on yes/y/no/n/true/t/false etc etc when converting string to boolean. Eagle-Eye-Stephen... ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel