home *** CD-ROM | disk | FTP | other *** search
- # CVS $Id: inputerr.tcl,v 1.3 1995/02/03 16:54:55 zibi Exp $
- #
- # This test that AddInput and RemoveInput will error out with bad input.
- #
- #
-
- proc check {cmd errorStr} {
- catch {
- eval "$cmd"
- } msg
-
- if {$msg == ""} {
- error "FAILED !!: $errorStr"
- } else {
- echo "PASSED: $errorStr"
- echo " $msg"
- }
- }
-
- pipe p1 p2
-
- check "VtAddInput bad bad bad" "VtAddInput, too many args"
- check "VtAddInput" "VtAddInput, too little args"
- check "VtAddInput bad proc" "VtAddInput, bad file descriptor"
-
- check "VtRemoveInput bad bad bad" "VtRemoveInput, too many args"
- check "VtRemoveInput " "VtRemoveInput, too little args"
- check "VtRemoveInput bad" "VtRemoveInput, bad file descriptor"
-