summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorstanton <stanton>1998-12-03 23:59:13 (GMT)
committerstanton <stanton>1998-12-03 23:59:13 (GMT)
commit004161fd112c24bf2a346f308456b9dcdd3c3c9b (patch)
treea9296bab98fd59486a56d90059b11934c872ccfd /tests
parent805f1dc81d20029a3c2173de827528a918741eab (diff)
downloadtcl-004161fd112c24bf2a346f308456b9dcdd3c3c9b.zip
tcl-004161fd112c24bf2a346f308456b9dcdd3c3c9b.tar.gz
tcl-004161fd112c24bf2a346f308456b9dcdd3c3c9b.tar.bz2
fixed various broken tests
Diffstat (limited to 'tests')
-rw-r--r--tests/regexp.test7
-rw-r--r--tests/string.test8
-rw-r--r--tests/switch.test6
-rw-r--r--tests/unixInit.test4
4 files changed, 14 insertions, 11 deletions
diff --git a/tests/regexp.test b/tests/regexp.test
index 8e52abf..29b94f6 100644
--- a/tests/regexp.test
+++ b/tests/regexp.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: regexp.test,v 1.1.2.4 1998/11/11 01:44:56 stanton Exp $
+# RCS: @(#) $Id: regexp.test,v 1.1.2.5 1998/12/03 23:59:13 stanton Exp $
if {[string compare test [info procs test]] == 1} then {source defs}
@@ -76,7 +76,10 @@ test regexp-2.7 {getting substrings back from regexp} {
set foo 1; set f2 1; set f3 1; set f4 1
list [regexp (a)(b)?(c) xacy foo f2 f3 f4] $foo $f2 $f3 $f4
} {1 ac a {} c}
-
+test regexp-2.8 {getting substrings back from regexp} {
+ set match {}
+ list [regexp {^a*b} aaaab match] $match
+} {1 aaaab}
test regexp-3.1 {-indices option to regexp} {
set foo {}
diff --git a/tests/string.test b/tests/string.test
index 5fd4352..9461fa6 100644
--- a/tests/string.test
+++ b/tests/string.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: string.test,v 1.1.2.1 1998/09/24 23:59:37 stanton Exp $
+# RCS: @(#) $Id: string.test,v 1.1.2.2 1998/12/03 23:59:13 stanton Exp $
if {[string compare test [info procs test]] == 1} then {source defs}
@@ -289,7 +289,7 @@ test string-10.4 {string trimright errors} {
} {1 {wrong # args: should be "string trimright string ?chars?"}}
test string-10.5 {string trimright errors} {
list [catch {string trimg a} msg] $msg
-} {1 {bad option "trimg": must be compare, first, index, last, length, match, range, tolower, toupper, trim, trimleft, trimright, wordend, or wordstart}}
+} {1 {bad option "trimg": must be compare, first, index, last, length, match, range, tolower, toupper, totitle, trim, trimleft, trimright, wordend, or wordstart}}
test string-11.1 {string tolower} {
string tolower ABCDeF
@@ -350,7 +350,7 @@ test string-13.8 {string wordend} {
test string-14.1 {string wordstart} {
list [catch {string word a} msg] $msg
-} {1 {ambiguous option "word": must be compare, first, index, last, length, match, range, tolower, toupper, trim, trimleft, trimright, wordend, or wordstart}}
+} {1 {ambiguous option "word": must be compare, first, index, last, length, match, range, tolower, toupper, totitle, trim, trimleft, trimright, wordend, or wordstart}}
test string-14.2 {string wordstart} {
list [catch {string wordstart a} msg] $msg
} {1 {wrong # args: should be "string wordstart string index"}}
@@ -378,7 +378,7 @@ test string-14.9 {string wordend} {
test string-15.1 {error conditions} {
list [catch {string gorp a b} msg] $msg
-} {1 {bad option "gorp": must be compare, first, index, last, length, match, range, tolower, toupper, trim, trimleft, trimright, wordend, or wordstart}}
+} {1 {bad option "gorp": must be compare, first, index, last, length, match, range, tolower, toupper, totitle, trim, trimleft, trimright, wordend, or wordstart}}
test string-15.2 {error conditions} {
list [catch {string} msg] $msg
} {1 {wrong # args: should be "string option arg ?arg ...?"}}
diff --git a/tests/switch.test b/tests/switch.test
index cf5fec9..a81e5a1 100644
--- a/tests/switch.test
+++ b/tests/switch.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: switch.test,v 1.1.2.2 1998/09/24 23:59:38 stanton Exp $
+# RCS: @(#) $Id: switch.test,v 1.1.2.3 1998/12/03 23:59:13 stanton Exp $
if {[string compare test [info procs test]] == 1} then {source defs}
@@ -56,7 +56,7 @@ test switch-3.1 {-exact vs. -glob vs. -regexp} {
}
} exact
test switch-3.2 {-exact vs. -glob vs. -regexp} {
- switch -exact -regexp aaaab {
+ switch -regexp aaaab {
^a*b$ {concat regexp}
*b {concat glob}
aaaab {concat exact}
@@ -121,7 +121,7 @@ test switch-5.1 {errors in -regexp matching} {
aaaab {concat exact}
default {concat none}
}} msg] $msg
-} {1 {couldn't compile regular expression pattern: ?+* follows nothing}}
+} {1 {couldn't compile regular expression pattern: quantifier operand invalid}}
test switch-6.1 {backslashes in patterns} {
switch -exact {\a\$\.\[} {
diff --git a/tests/unixInit.test b/tests/unixInit.test
index 112552d..afbb794 100644
--- a/tests/unixInit.test
+++ b/tests/unixInit.test
@@ -115,7 +115,7 @@ test unixInit-3.1 {TclpSetInitialEncodings} {
set f [open "|[list $tcltest]" w+]
fconfigure $f -buffering none
- puts $f {puts [testencoding system]; exit}
+ puts $f {puts [encoding system]; exit}
set enc [gets $f]
close $f
unset env(LANG)
@@ -127,7 +127,7 @@ test unixInit-3.1 {TclpSetInitialEncodings} {japanese nonPortable} {
set f [open "|[list $tcltest]" w+]
fconfigure $f -buffering none
- puts $f {puts [testencoding system]; exit}
+ puts $f {puts [encoding system]; exit}
set enc [gets $f]
close $f
unset env(LANG)