Update tclpro; add a test
This commit is contained in:
parent
e24d0a4659
commit
402071065f
4 changed files with 68 additions and 2 deletions
5
support/test/tcl/.tclpro/extensions/test.pdx
Normal file
5
support/test/tcl/.tclpro/extensions/test.pdx
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
instrument::addExtension 2.0 {test}
|
||||
|
||||
instrument::addCommand Wrap { parseBody }
|
||||
|
||||
# vim: ft=tcl
|
||||
11
support/test/tcl/.vimspector.json
Normal file
11
support/test/tcl/.vimspector.json
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"configurations": {
|
||||
"Run Current Script": {
|
||||
"adapter": "tclpro",
|
||||
"configuration": {
|
||||
"request": "launch",
|
||||
"target": "${file}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
28
support/test/tcl/test
Normal file
28
support/test/tcl/test
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env tclsh
|
||||
|
||||
set SCALAR g
|
||||
array set ARRAY {key1 value1 key2 value2}
|
||||
|
||||
proc Wrap { body } {
|
||||
uplevel 1 $body
|
||||
}
|
||||
|
||||
proc Main {} {
|
||||
global SCALAR
|
||||
set prefix "VAR: "
|
||||
Wrap {
|
||||
puts $SCALAR
|
||||
global ARRAY
|
||||
puts [array names ARRAY]
|
||||
|
||||
set vars [list]
|
||||
foreach n [array names ::env] {
|
||||
set prefix "ENVVAR: $n = "
|
||||
puts "$prefix $::env($n)"
|
||||
lappend vars $n
|
||||
}
|
||||
}
|
||||
puts $vars
|
||||
}
|
||||
|
||||
Main
|
||||
Loading…
Add table
Add a link
Reference in a new issue