summaryrefslogtreecommitdiffstats
path: root/tests/pkgMkIndex.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pkgMkIndex.test')
-rw-r--r--tests/pkgMkIndex.test48
1 files changed, 24 insertions, 24 deletions
diff --git a/tests/pkgMkIndex.test b/tests/pkgMkIndex.test
index 9f3b8fa..663a6b2 100644
--- a/tests/pkgMkIndex.test
+++ b/tests/pkgMkIndex.test
@@ -87,7 +87,7 @@ proc pkgtest::parseIndex { filePath } {
set ver [lindex $args 2]
set ::PKGS($pkg:$ver) [lindex $args 3]
} else {
- return [eval package_original $args]
+ return [package_original {*}$args]
}
}
array set ::PKGS {}
@@ -146,7 +146,7 @@ proc pkgtest::parseIndex { filePath } {
# 1: the error result if element 0 was 1
proc pkgtest::createIndex { args } {
- set parsed [eval parseArgs $args]
+ set parsed [parseArgs {*}$args]
set options [lindex $parsed 0]
set dirPath [lindex $parsed 1]
set patternList [lindex $parsed 2]
@@ -155,7 +155,7 @@ proc pkgtest::createIndex { args } {
if {[catch {
file delete [file join $dirPath pkgIndex.tcl]
- eval pkg_mkIndex $options [list $dirPath] $patternList
+ pkg_mkIndex {*}$options $dirPath {*}$patternList
} err]} {
return [list 1 $err]
}
@@ -229,7 +229,7 @@ proc makePkgList { inList } {
proc pkgtest::runCreatedIndex {rv args} {
if {[lindex $rv 0] == 0} {
- set parsed [eval parseArgs $args]
+ set parsed [parseArgs {*}$args]
set dirPath [lindex $parsed 1]
set idxFile [file join $dirPath pkgIndex.tcl]
@@ -246,8 +246,8 @@ proc pkgtest::runCreatedIndex {rv args} {
return $result
}
proc pkgtest::runIndex { args } {
- set rv [eval createIndex $args]
- return [eval [list runCreatedIndex $rv] $args]
+ set rv [createIndex {*}$args]
+ return [runCreatedIndex $rv {*}$args]
}
# If there is no match to the patterns, make sure the directory hasn't
@@ -560,17 +560,17 @@ removeFile [file join pkg circ3.tcl]
set x [file join [file dirname [info nameofexecutable]] dltest \
pkga[info sharedlibextension]]
set dll "[file tail $x]Required"
-::tcltest::testConstraint $dll [file exists $x]
+testConstraint $dll [file exists $x]
if {[testConstraint $dll]} {
-makeFile {
+ makeFile {
# This package provides Pkga, which is also provided by a DLL.
package provide Pkga 1.0
proc pkga_neq { x } {
return [expr {! [pkgq_eq $x]}]
}
} [file join pkg pkga.tcl]
-file copy -force $x $fullPkgPath
+ file copy -force $x $fullPkgPath
}
testConstraint exec [llength [info commands ::exec]]
@@ -596,8 +596,8 @@ test pkgMkIndex-10.2 {package in DLL hidden by -load} [list exec $dll] {
} {0 {}}
if {[testConstraint $dll]} {
-file delete -force [file join $fullPkgPath [file tail $x]]
-removeFile [file join pkg pkga.tcl]
+ file delete -force [file join $fullPkgPath [file tail $x]]
+ removeFile [file join pkg pkga.tcl]
}
# Tolerate "namespace import" at the global scope
@@ -671,24 +671,24 @@ test pkgMkIndex-13.1 {proc names with embedded spaces} {
removeFile [file join pkg spacename.tcl]
-# Test the pkg_compareExtension helper function
-test pkgMkIndex-14.1 {pkg_compareExtension} {unixOnly} {
- pkg_compareExtension foo.so .so
+# Test the tcl::Pkg::CompareExtension helper function
+test pkgMkIndex-14.1 {tcl::Pkg::CompareExtension} {unix} {
+ tcl::Pkg::CompareExtension foo.so .so
} 1
-test pkgMkIndex-14.2 {pkg_compareExtension} {unixOnly} {
- pkg_compareExtension foo.so.bar .so
+test pkgMkIndex-14.2 {tcl::Pkg::CompareExtension} {unix} {
+ tcl::Pkg::CompareExtension foo.so.bar .so
} 0
-test pkgMkIndex-14.3 {pkg_compareExtension} {unixOnly} {
- pkg_compareExtension foo.so.1 .so
+test pkgMkIndex-14.3 {tcl::Pkg::CompareExtension} {unix} {
+ tcl::Pkg::CompareExtension foo.so.1 .so
} 1
-test pkgMkIndex-14.4 {pkg_compareExtension} {unixOnly} {
- pkg_compareExtension foo.so.1.2 .so
+test pkgMkIndex-14.4 {tcl::Pkg::CompareExtension} {unix} {
+ tcl::Pkg::CompareExtension foo.so.1.2 .so
} 1
-test pkgMkIndex-14.5 {pkg_compareExtension} {unixOnly} {
- pkg_compareExtension foo .so
+test pkgMkIndex-14.5 {tcl::Pkg::CompareExtension} {unix} {
+ tcl::Pkg::CompareExtension foo .so
} 0
-test pkgMkIndex-14.6 {pkg_compareExtension} {unixOnly} {
- pkg_compareExtension foo.so.1.2.bar .so
+test pkgMkIndex-14.6 {tcl::Pkg::CompareExtension} {unix} {
+ tcl::Pkg::CompareExtension foo.so.1.2.bar .so
} 0
# cleanup