summaryrefslogtreecommitdiffstats
path: root/tests/info.test
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2000-01-12 11:13:24 (GMT)
committerhobbs <hobbs@noemail.net>2000-01-12 11:13:24 (GMT)
commitef945e732e6bc568615ce0070db4a13535e12966 (patch)
tree82af689b665b52d5f4be35155ac4d08136341e92 /tests/info.test
parentf2027d6f041a639c97de2694e04f53631a8a0006 (diff)
downloadtcl-ef945e732e6bc568615ce0070db4a13535e12966.zip
tcl-ef945e732e6bc568615ce0070db4a13535e12966.tar.gz
tcl-ef945e732e6bc568615ce0070db4a13535e12966.tar.bz2
* tests/info.test:
* generic/tclCmdIL.c: fixed 'info procs ::namesp::*' behavior (Dejong) * tests/unixFCmd.test: * unix/tclUnixFCmd.c: added support for symbolic permissions setting in SetPermissionsAttribute (file attr $file -perm ...) [Bug: 3970] * tests/utf.test: fixed test that allowed \8 as octal value FossilOrigin-Name: 2ce9534422c6e21c2559669571abd9602adaef0f
Diffstat (limited to 'tests/info.test')
-rw-r--r--tests/info.test60
1 files changed, 59 insertions, 1 deletions
diff --git a/tests/info.test b/tests/info.test
index 9297931..a9ba98b 100644
--- a/tests/info.test
+++ b/tests/info.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: info.test,v 1.12 1999/12/12 02:27:03 hobbs Exp $
+# RCS: @(#) $Id: info.test,v 1.13 2000/01/12 11:13:25 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -426,6 +426,64 @@ test info-15.4 {info procs option} {
list [info procs] [info procs p*]
}
} {{p q r} p}
+test info-15.5 {info procs option with a proc in a namespace} {
+ catch {namespace delete test_ns_info2}
+ namespace eval test_ns_info2 {
+ proc p1 { arg } {
+ puts cmd
+ }
+ proc p2 { arg } {
+ puts cmd
+ }
+ }
+ info procs ::test_ns_info2::p1
+} {::test_ns_info2::p1}
+test info-15.6 {info procs option with a pattern in a namespace} {
+ catch {namespace delete test_ns_info2}
+ namespace eval test_ns_info2 {
+ proc p1 { arg } {
+ puts cmd
+ }
+ proc p2 { arg } {
+ puts cmd
+ }
+ }
+ lsort [info procs ::test_ns_info2::p*]
+} [lsort [list ::test_ns_info2::p1 ::test_ns_info2::p2]]
+test info-15.7 {info procs option with a global shadowing proc} {
+ catch {namespace delete test_ns_info2}
+ proc string_cmd { arg } {
+ puts cmd
+ }
+ namespace eval test_ns_info2 {
+ proc string_cmd { arg } {
+ puts cmd
+ }
+ }
+ info procs test_ns_info2::string*
+} {::test_ns_info2::string_cmd}
+# This regression test is currently commented out because it requires
+# that the implementation of "info procs" looks into the global namespace,
+# which it does not (in contrast to "info commands")
+if {0} {
+test info-15.8 {info procs option with a global shadowing proc} {
+ catch {namespace delete test_ns_info2}
+ proc string_cmd { arg } {
+ puts cmd
+ }
+ proc string_cmd2 { arg } {
+ puts cmd
+ }
+ namespace eval test_ns_info2 {
+ proc string_cmd { arg } {
+ puts cmd
+ }
+ }
+ namespace eval test_ns_info2 {
+ lsort [info procs string*]
+ }
+} [lsort [list string_cmd string_cmd2]]
+}
test info-16.1 {info script option} {
list [catch {info script x} msg] $msg