summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-03-21 14:35:34 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-03-21 14:35:34 (GMT)
commit4e6cf83ae3b856598a8c57d80867a015b162707e (patch)
tree7aaec4b6249847aed37d5170d228c0076d090fe0 /tests
parentd06c12ad4e7d14199f6c4d531f379b3347d4d06c (diff)
parentf9a1022456da2832c6a6609935e9ab40e10a8b22 (diff)
downloadtcl-4e6cf83ae3b856598a8c57d80867a015b162707e.zip
tcl-4e6cf83ae3b856598a8c57d80867a015b162707e.tar.gz
tcl-4e6cf83ae3b856598a8c57d80867a015b162707e.tar.bz2
2102614 Add ensemble indexing support to [auto_mkindex]. Thanks Brian Griffin.
Diffstat (limited to 'tests')
-rw-r--r--tests/autoMkindex.test31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/autoMkindex.test b/tests/autoMkindex.test
index 8f29131..a7f72dc 100644
--- a/tests/autoMkindex.test
+++ b/tests/autoMkindex.test
@@ -236,6 +236,37 @@ test autoMkindex-3.3 {auto_mkindex_parser::command} -setup {
# Reset initCommands to avoid trashing other tests
AutoMkindexTestReset
} -result "{::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]]}}
test autoMkindex-4.1 {platform independent source commands} -setup {
file delete tclIndex