summaryrefslogtreecommitdiffstats
path: root/tests/opt.test
diff options
context:
space:
mode:
authorstanton <stanton>1999-04-16 00:46:29 (GMT)
committerstanton <stanton>1999-04-16 00:46:29 (GMT)
commit97464e6cba8eb0008cf2727c15718671992b913f (patch)
treece9959f2747257d98d52ec8d18bf3b0de99b9535 /tests/opt.test
parenta8c96ddb94d1483a9de5e340b740cb74ef6cafa7 (diff)
downloadtcl-97464e6cba8eb0008cf2727c15718671992b913f.zip
tcl-97464e6cba8eb0008cf2727c15718671992b913f.tar.gz
tcl-97464e6cba8eb0008cf2727c15718671992b913f.tar.bz2
merged tcl 8.1 branch back into the main trunk
Diffstat (limited to 'tests/opt.test')
-rw-r--r--tests/opt.test29
1 files changed, 21 insertions, 8 deletions
diff --git a/tests/opt.test b/tests/opt.test
index ce79827..3ca62f2 100644
--- a/tests/opt.test
+++ b/tests/opt.test
@@ -1,4 +1,4 @@
-# Package covered: opt0.1/optparse.tcl
+# Package covered: opt1.0/optparse.tcl
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands. Sourcing this file into Tcl runs the tests and
@@ -6,16 +6,19 @@
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
+# Copyright (c) 1998-1999 by Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: opt.test,v 1.3 1998/09/14 18:40:12 stanton Exp $
+# RCS: @(#) $Id: opt.test,v 1.4 1999/04/16 00:47:31 stanton Exp $
-if {[string compare test [info procs test]] == 1} then {source defs}
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ source [file join [pwd] [file dirname [info script]] defs.tcl]
+}
# the package we are going to test
-package require opt 0.1
+package require opt 0.4.1
# we are using implementation specifics to test the package
@@ -253,7 +256,6 @@ test opt-10.10 {medium size overall test} {
list [catch {optTest save tst foo} msg] [lindex [split $msg "\n"] 0]
} {1 {too many arguments (unexpected argument(s): foo), usage:}}
-
test opt-11.1 {too many args test 2} {
set key [::tcl::OptKeyRegister {-foo}]
list [catch {::tcl::OptKeyParse $key {-foo blah}} msg] $msg\
@@ -263,9 +265,6 @@ test opt-11.1 {too many args test 2} {
------------ ---- ----- ----
( -help gives this help )
-foo boolflag (false) } {}}
-
-
-
test opt-11.2 {default value for args} {
set args {}
set key [::tcl::OptKeyRegister {{args -list {a b c} "args..."}}]
@@ -274,4 +273,18 @@ test opt-11.2 {default value for args} {
set args
} {a b c}
+# cleanup
+::tcltest::cleanupTests
+return
+
+
+
+
+
+
+
+
+
+
+