home *** CD-ROM | disk | FTP | other *** search
- #
- # pushd.test
- #
- # Tests for tcl.tlib directory directory stack routines.
- #
- #---------------------------------------------------------------------------
- # Copyright 1992-1993 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: pushd.test,v 3.0 1993/11/19 06:58:00 markd Rel $
- #------------------------------------------------------------------------------
- #
-
- if {[info procs test] == ""} then {source testlib.tcl}
- eval $SAVED_UNKNOWN
-
- set CWD [pwd]
-
- cd /tmp
-
- #
- # Get actual location of /tmp incase its symbolicly linked.
- #
- set TMP [pwd]
-
- Test pushd-1.1 {ppushd command} {
- pushd
- } 0 {}
-
- Test pushd-1.2 {pushd command} {
- set dummy $TCLXENV(dirPushList)
- } 0 $TMP
-
- Test pushd-1.3 {pushd command} {
- pushd /
- } 0 {}
-
- Test pushd-1.4 {pushd command} {
- set TCLXENV(dirPushList)
- } 0 "$TMP $TMP"
-
- cd $CWD
-
- Test popd-1.1 {popd command} {
- popd
- } 0 $TMP
-
- Test popd-1.2 {popd command} {
- set TCLXENV(dirPushList)
- } 0 $TMP
-
- Test popd-1.3 {popd command} {
- popd
- popd
- } 1 {directory stack empty}
-
- Test popd-1.4 {popd command} {
- set TCLXENV(dirPushList)
- } 0 {}
-
- cd $CWD
- rename unknown {}
-
-