summaryrefslogtreecommitdiffstats
path: root/tests/autoMkindex.test
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2013-03-21 14:28:59 (GMT)
committerdgp <dgp@noemail.net>2013-03-21 14:28:59 (GMT)
commit754b9cb1fbe0467e87c79b78a07a309fee3d719d (patch)
tree553365144a6d50b02e653b4279f40544aa7a40d0 /tests/autoMkindex.test
parent7ab73292590ac84ca3e58f1149c07edf2e1d59cf (diff)
downloadtcl-754b9cb1fbe0467e87c79b78a07a309fee3d719d.zip
tcl-754b9cb1fbe0467e87c79b78a07a309fee3d719d.tar.gz
tcl-754b9cb1fbe0467e87c79b78a07a309fee3d719d.tar.bz2
2102614 Add ensemble indexing support to [auto_mkindex]. Thanks Brian Griffin.
FossilOrigin-Name: 7a2254a607e7db0f9c8fb4a8d74f84584fc514af
Diffstat (limited to 'tests/autoMkindex.test')
-rw-r--r--tests/autoMkindex.test31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/autoMkindex.test b/tests/autoMkindex.test
index be1e3e6..c105e95 100644
--- a/tests/autoMkindex.test
+++ b/tests/autoMkindex.test
@@ -251,6 +251,37 @@ test autoMkindex-3.3 {auto_mkindex_parser::command} {knownBug} {
list [lvalue $::result *mycmd4*] [lvalue $::result *mycmd5*] [lvalue $::result *mycmd6*]
} "{::buried::mycmd4 $element} {::buried::mycmd5 $element} {mycmd6 $element}"
+makeFile {
+
+namespace eval wok {
+ namespace ensemble create -subcommands {commands vars}
+
+ proc commands {{pattern *}} {
+ puts [join [lsort -dictionary [info commands $pattern]] \n]
+ }
+
+ proc vars {{pattern *}} {
+ puts [join [lsort -dictionary [info vars $pattern]] \n]
+ }
+
+}
+
+} ensemblecommands.tcl
+
+test autoMkindex-3.3 {ensemble commands in tclIndex} {
+ file delete tclIndex
+ auto_mkindex . ensemblecommands.tcl
+ set f [open tclIndex r]
+ set dat [list]
+ foreach r [split [string trim [read $f]] "\n"] {
+ if {[string match {set auto_index*} $r]} {
+ lappend dat $r
+ }
+ }
+ set result [lsort $dat]
+ close $f
+ set result
+} {{set auto_index(::wok::commands) [list source [file join $dir ensemblecommands.tcl]]} {set auto_index(::wok::vars) [list source [file join $dir ensemblecommands.tcl]]} {set auto_index(wok) [list source [file join $dir ensemblecommands.tcl]]}}
makeDirectory pkg
makeFile {