summaryrefslogtreecommitdiffstats
path: root/tests/tm.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tm.test')
-rw-r--r--tests/tm.test15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/tm.test b/tests/tm.test
index a1959e6..3f93483 100644
--- a/tests/tm.test
+++ b/tests/tm.test
@@ -3,11 +3,12 @@
# Sourcing this file into Tcl runs the tests and generates output for
# errors. No output means no errors were found.
#
-# Copyright © 2004 Donal K. Fellows.
+# Copyright (c) 2004 by Donal K. Fellows.
# All rights reserved.
+package require Tcl 8.5
if {"::tcltest" ni [namespace children]} {
- package require tcltest 2.5
+ package require tcltest 2
namespace import -force ::tcltest::*
}
@@ -18,12 +19,12 @@ test tm-1.1 {tm: path command exists} {
test tm-1.2 {tm: path command syntax} -returnCodes error -body {
::tcl::tm::path foo
} -result {unknown or ambiguous subcommand "foo": must be add, list, or remove}
-test tm-1.3 {tm: path command syntax} {
+test tm-1.3 {tm: path command syntax} -returnCodes error -body {
::tcl::tm::path add
-} {}
-test tm-1.4 {tm: path command syntax} {
+} -result "wrong # args: should be \"::tcl::tm::path add path ...\""
+test tm-1.4 {tm: path command syntax} -returnCodes error -body {
::tcl::tm::path remove
-} {}
+} -result "wrong # args: should be \"::tcl::tm::path remove path ...\""
test tm-1.5 {tm: path command syntax} -returnCodes error -body {
::tcl::tm::path list foobar
} -result "wrong # args: should be \"::tcl::tm::path list\""
@@ -199,7 +200,7 @@ test tm-3.11 {tm: module path management, remove ignores unknown path} -setup {
proc genpaths {base} {
# Normalizing picks up drive letters on windows [Bug 1053568]
set base [file normalize $base]
- regexp {^(\d+)\.(\d+)} [package provide tcl] - major minor
+ lassign [split [package present Tcl] .] major minor
set results {}
set base [file join $base tcl$major]
lappend results [file join $base site-tcl]