From: Mo D. <md...@cy...> - 2000-09-12 05:46:30
|
Good morning. How would folks feel about the following patch? It adds two additional test for the strings "true" and "false" in an if command. This is a feature that was recently added to Jacl, and it seems to be something that was not tested by the regular Tcl test suite. Mo DeJong Red Hat Inc Index: ChangeLog =================================================================== RCS file: /home/cvs/external/tcl/ChangeLog,v retrieving revision 1.309 diff -u -r1.309 ChangeLog --- ChangeLog 2000/09/08 04:00:08 1.309 +++ ChangeLog 2000/09/12 05:43:31 @@ -1,3 +1,8 @@ +2000-09-11 Mo DeJong <md...@re...> + + * tests/if.test: Added additional test that check + for boolean true and false in an if statement. + 2000-09-07 David Gravereaux <dav...@aj...> * win/.cvsignore: changed the glob patterns a bit to exclude VC++ Index: tests/if.test =================================================================== RCS file: /home/cvs/external/tcl/tests/if.test,v retrieving revision 1.5 diff -u -r1.5 if.test --- if.test 2000/04/10 17:19:00 1.5 +++ if.test 2000/09/12 05:43:32 @@ -1075,18 +1075,25 @@ [unset iftracevar iftracecounter] } {1 {syntax error in expression "1 oops 10 + 20"} 0 {} {}} +test if-11.1 {true and false} { + set bool true + set result 0 + if {1 && $bool} { + set result 1 + } + set result +} {1} + +test if-11.2 {true and false} { + set bool false + set result 0 + if {1 && $bool} { + set result 1 + } + set result +} {0} + # cleanup ::tcltest::cleanupTests return -- The TclCore mailing list is sponsored by Ajuba Solutions To unsubscribe: email tcl...@aj... with the word UNSUBSCRIBE as the subject. |