1# Commands covered: pwd 2# 3# This file contains a collection of tests for one or more of the Tcl 4# built-in commands. Sourcing this file into Tcl runs the tests and 5# generates output for errors. No output means no errors were found. 6# 7# Copyright © 1991-1993 The Regents of the University of California. 8# Copyright © 1994-1997 Sun Microsystems, Inc. 9# Copyright © 1998-1999 Scriptics Corporation. 10# 11# See the file "license.terms" for information on usage and redistribution 12# of this file, and for a DISCLAIMER OF ALL WARRANTIES. 13 14if {"::tcltest" ni [namespace children]} { 15 package require tcltest 2.5 16 namespace import -force ::tcltest::* 17} 18 19test pwd-1.1 {simple pwd} { 20 catch pwd 21} 0 22test pwd-1.2 {simple pwd} { 23 expr {[string length [pwd]]>0} 24} 1 25 26test pwd-2.1 {pwd takes no args} -body { 27 pwd foobar 28} -returnCodes error -result "wrong \# args: should be \"pwd\"" 29 30# cleanup 31::tcltest::cleanupTests 32return 33