summaryrefslogtreecommitdiffstats
path: root/tests/autoMkindex.tcl
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-07-01 04:06:51 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-07-01 04:06:51 (GMT)
commit21c2b3f94cc68e59ad5b480e23615818aca6c6e3 (patch)
tree598fe38989c6bb6e2a7fcdef06a31cce6335fe7d /tests/autoMkindex.tcl
parent9aa8e5b0df06c585ca9336eaea31fd6cde87d2f5 (diff)
downloadtcl-21c2b3f94cc68e59ad5b480e23615818aca6c6e3.zip
tcl-21c2b3f94cc68e59ad5b480e23615818aca6c6e3.tar.gz
tcl-21c2b3f94cc68e59ad5b480e23615818aca6c6e3.tar.bz2
* Updated auto_mkIndex tests to use
[makeFile] and [removeFile] so tests are done in [temporaryDirecotry] where write access is guaranteed.
Diffstat (limited to 'tests/autoMkindex.tcl')
-rw-r--r--tests/autoMkindex.tcl82
1 files changed, 0 insertions, 82 deletions
diff --git a/tests/autoMkindex.tcl b/tests/autoMkindex.tcl
deleted file mode 100644
index 8e9e74d..0000000
--- a/tests/autoMkindex.tcl
+++ /dev/null
@@ -1,82 +0,0 @@
-# Test file for:
-# auto_mkindex
-#
-# This file provides example cases for testing the Tcl autoloading
-# facility. Things are much more complicated with namespaces and classes.
-# The "auto_mkindex" facility can no longer be built on top of a simple
-# regular expression parser. It must recognize constructs like this:
-#
-# namespace eval foo {
-# proc test {x y} { ... }
-# namespace eval bar {
-# proc another {args} { ... }
-# }
-# }
-#
-# Note that procedures and itcl class definitions can be nested inside
-# of namespaces.
-#
-# Copyright (c) 1993-1998 Lucent Technologies, Inc.
-
-# This shouldn't cause any problems
-namespace import -force blt::*
-
-# Should be able to handle "proc" definitions, even if they are
-# preceded by white space.
-
-proc normal {x y} {return [expr $x+$y]}
- proc indented {x y} {return [expr $x+$y]}
-
-#
-# Should be able to handle proc declarations within namespaces,
-# even if they have explicit namespace paths.
-#
-namespace eval buried {
- proc inside {args} {return "inside: $args"}
-
- namespace export pub_*
- proc pub_one {args} {return "one: $args"}
- proc pub_two {args} {return "two: $args"}
-}
-proc buried::within {args} {return "within: $args"}
-
-namespace eval buried {
- namespace eval under {
- proc neath {args} {return "neath: $args"}
- }
- namespace eval ::buried {
- proc relative {args} {return "relative: $args"}
- proc ::top {args} {return "top: $args"}
- proc ::buried::explicit {args} {return "explicit: $args"}
- }
-}
-
-# With proper hooks, we should be able to support other commands
-# that create procedures
-
-proc buried::myproc {name body args} {
- ::proc $name $body $args
-}
-namespace eval ::buried {
- proc mycmd1 args {return "mycmd"}
- myproc mycmd2 args {return "mycmd"}
-}
-::buried::myproc mycmd3 args {return "another"}
-
-proc {buried::my proc} {name body args} {
- ::proc $name $body $args
-}
-namespace eval ::buried {
- proc mycmd4 args {return "mycmd"}
- {my proc} mycmd5 args {return "mycmd"}
-}
-{::buried::my proc} mycmd6 args {return "another"}
-
-# A correctly functioning [auto_import] won't choke when a child
-# namespace [namespace import]s from its parent.
-#
-namespace eval ::parent::child {
- namespace import ::parent::*
-}
-proc ::parent::child::test {} {}
-