| Line | |
|---|
| 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 (c) 1991-1993 The Regents of the University of California. |
|---|
| 8 | # Copyright (c) 1994-1997 Sun Microsystems, Inc. |
|---|
| 9 | # Copyright (c) 1998-1999 by 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 | # |
|---|
| 14 | # RCS: @(#) $Id: pwd.test,v 1.7 2004/05/19 13:00:13 dkf Exp $ |
|---|
| 15 | |
|---|
| 16 | if {[lsearch [namespace children] ::tcltest] == -1} { |
|---|
| 17 | package require tcltest 2 |
|---|
| 18 | namespace import -force ::tcltest::* |
|---|
| 19 | } |
|---|
| 20 | |
|---|
| 21 | test pwd-1.1 {simple pwd} { |
|---|
| 22 | catch pwd |
|---|
| 23 | } 0 |
|---|
| 24 | test pwd-1.2 {simple pwd} { |
|---|
| 25 | expr [string length pwd]>0 |
|---|
| 26 | } 1 |
|---|
| 27 | test pwd-1.3 {pwd takes no args} -body { |
|---|
| 28 | pwd foobar |
|---|
| 29 | } -returnCodes error -result "wrong \# args: should be \"pwd\"" |
|---|
| 30 | |
|---|
| 31 | # cleanup |
|---|
| 32 | ::tcltest::cleanupTests |
|---|
| 33 | return |
|---|
Note: See
TracBrowser
for help on using the repository browser.