# # socket.test # # Test for socket and network related commands. #------------------------------------------------------------------------------ # Copyright 1992-1999 Karl Lehenbauer and Mark Diekhans. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, provided # that the above copyright notice appear in all copies. Karl Lehenbauer and # Mark Diekhans make no representations about the suitability of this # software for any purpose. It is provided "as is" without express or # implied warranty. #------------------------------------------------------------------------------ # $Id: socket.test,v 1.1 2001/10/24 23:31:49 hobbs Exp $ #------------------------------------------------------------------------------ # if {[cequal [info procs Test] {}]} { source [file join [file dirname [info script]] testlib.tcl] } if [cequal $tcl_platform(platform) windows] { echo " * The socket tests have not been ported to Win32" return } # # Do all argument and error checking. We can at least test this, even # if we can't run full tests on this particular system. # Test socket-1.0 {host_info argument checking} { host_info } 1 {wrong # args: host_info option ...} Test socket-1.1 {host_info argument checking} { host_info addresses } 1 {wrong # args: host_info addresses host} Test socket-1.2 {host_info argument checking} { host_info addresses xxx yyy } 1 {wrong # args: host_info addresses host} Test socket-1.3 {host_info argument checking} { host_info bad localhost } 1 {invalid option "bad", expected one of "addresses", "official_name", or "aliases"} # # Determine if we are at a development site we know is good. If we are, we # do more checking. # switch -glob -- [id host] { {*.neosoft.com} {set safeHost 1} {*.grizzly.com} {set safeHost 1} default {set safeHost 0} } if [info exists env(TCLX_FULL_TESTS)] { set safeHost 1 } # FIX: Add hostinfo tests. # cleanup ::tcltest::cleanupTests return