summaryrefslogtreecommitdiff
path: root/tcl/tests/pkg/pkg4.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'tcl/tests/pkg/pkg4.tcl')
-rw-r--r--tcl/tests/pkg/pkg4.tcl27
1 files changed, 27 insertions, 0 deletions
diff --git a/tcl/tests/pkg/pkg4.tcl b/tcl/tests/pkg/pkg4.tcl
new file mode 100644
index 00000000000..36587c92874
--- /dev/null
+++ b/tcl/tests/pkg/pkg4.tcl
@@ -0,0 +1,27 @@
+# pkg4.tcl --
+#
+# Test package for pkg_mkIndex. This package requires pkg3, and it calls
+# a pkg3 proc in the code that is executed by the file
+#
+# Copyright (c) 1998 by Scriptics Corporation.
+# All rights reserved.
+#
+# RCS: @(#) $Id$
+
+package require pkg3 1.0
+
+package provide pkg4 1.0
+
+namespace eval pkg4 {
+ namespace export p4-1 p4-2
+ variable m2 [pkg3::p3-1 10]
+}
+
+proc pkg4::p4-1 { num } {
+ variable m2
+ return [expr {$m2 * $num}]
+}
+
+proc pkg4::p4-2 { num } {
+ return [pkg3::p3-2 $num]
+}