summaryrefslogtreecommitdiffstats
path: root/tests/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pkg')
-rw-r--r--tests/pkg/import.tcl16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/pkg/import.tcl b/tests/pkg/import.tcl
new file mode 100644
index 0000000..e7196f5
--- /dev/null
+++ b/tests/pkg/import.tcl
@@ -0,0 +1,16 @@
+package provide fubar 1.0
+
+namespace eval ::fubar:: {
+ #
+ # export only public functions.
+ #
+ namespace export {[a-z]*}
+}
+
+proc ::fubar::foo {bar} {
+ puts "$bar"
+ return true
+}
+
+namespace import ::fubar::foo
+