summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjenn <jenn>1999-06-30 00:17:36 (GMT)
committerjenn <jenn>1999-06-30 00:17:36 (GMT)
commit8a59345df4ffc01304241954602e6f2185393130 (patch)
tree757ca00da5f9eaf7740f9abf1f4f318f1d98fb06 /tests
parentad8e9072d6bede2a254a1227a5c1d65fba9b39d4 (diff)
downloadtcl-8a59345df4ffc01304241954602e6f2185393130.zip
tcl-8a59345df4ffc01304241954602e6f2185393130.tar.gz
tcl-8a59345df4ffc01304241954602e6f2185393130.tar.bz2
Added a check to not rename incr unless it's been previously
renamed.
Diffstat (limited to 'tests')
-rw-r--r--tests/rename.test9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/rename.test b/tests/rename.test
index b0a4a7c..d938469 100644
--- a/tests/rename.test
+++ b/tests/rename.test
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: rename.test,v 1.5 1999/06/26 20:55:11 rjohnson Exp $
+# RCS: @(#) $Id: rename.test,v 1.6 1999/06/30 00:17:36 jenn Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -167,9 +167,10 @@ test rename-6.1 {old code invalidated (epoch incremented) when cmd with compile
set msg
} {called "incr" with too many arguments}
-# cleanup
-catch {rename incr {}}
-catch {rename incr.old incr}
+if {[info commands incr.old] != {}} {
+ catch {rename incr {}}
+ catch {rename incr.old incr}
+}
::tcltest::cleanupTests
return