diff options
author | dgp <dgp@users.sourceforge.net> | 2007-10-15 21:27:47 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2007-10-15 21:27:47 (GMT) |
commit | 7222d685f8f460bfd8edb01515a8d6ad5e5c60a3 (patch) | |
tree | 660da6ea51654bcc0e6047863d9213d28f2694a4 /tests/string.test | |
parent | 03bf8aafa026b3996c8907876f76f3b43d77da04 (diff) | |
download | tcl-7222d685f8f460bfd8edb01515a8d6ad5e5c60a3.zip tcl-7222d685f8f460bfd8edb01515a8d6ad5e5c60a3.tar.gz tcl-7222d685f8f460bfd8edb01515a8d6ad5e5c60a3.tar.bz2 |
* generic/tclIOCmd.c: Revise [open] so that it interprets leading
zero strings passed as the "permissions" argument as octal numbers,
even if Tcl itself no longer parses integers in that way.
* unix/tclUnixFCmd.c: Revise the "-permissions" [file attribute] so
that it interprets leading zero strings as octal numbers, even if Tcl
itself no longer parses integers in that way.
* generic/tclCompExpr.c: Corrections to code that produces
* generic/tclUtil.c: extended "bad octal" error messages.
* tests/cmdAH.test: Test revisions so that tests pass whether or
* tests/cmdIL.test: not Tcl parses leading zero strings as octal.
* tests/compExpr-old.test:
* tests/compExpr.test:
* tests/compile.test:
* tests/expr-old.test:
* tests/expr.test:
* tests/incr.test:
* tests/io.test:
* tests/lindex.test:
* tests/link.test:
* tests/mathop.test:
* tests/parseExpr.test:
* tests/set.test:
* tests/string.test:
* tests/stringComp.test:
Diffstat (limited to 'tests/string.test')
-rw-r--r-- | tests/string.test | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/string.test b/tests/string.test index e408048..8cf93b7 100644 --- a/tests/string.test +++ b/tests/string.test @@ -12,7 +12,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.64 2007/10/11 21:35:01 dgp Exp $ +# RCS: @(#) $Id: string.test,v 1.65 2007/10/15 21:27:50 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -274,12 +274,12 @@ test string-5.16 {string index, bytearray object with string obj shimmering} { binary scan $str H* dump string compare [string index $str 10] \x00 } 0 -test string-5.17 {string index, bad integer} { - list [catch {string index "abc" 08} msg] $msg -} {1 {bad index "08": must be integer?[+-]integer? or end?[+-]integer? (looks like invalid octal number)}} -test string-5.18 {string index, bad integer} { - list [catch {string index "abc" end-00289} msg] $msg -} {1 {bad index "end-00289": must be integer?[+-]integer? or end?[+-]integer? (looks like invalid octal number)}} +test string-5.17 {string index, bad integer} -body { + list [catch {string index "abc" 0o8} msg] $msg +} -match glob -result {1 {*invalid octal number*}} +test string-5.18 {string index, bad integer} -body { + list [catch {string index "abc" end-0o0289} msg] $msg +} -match glob -result {1 {*invalid octal number*}} test string-5.19 {string index, bytearray object out of bounds} { string index [binary format I* {0x50515253 0x52}] -1 } {} @@ -480,8 +480,8 @@ test string-6.57 {string is integer, false} { list [string is integer -fail var " "] $var } {0 0} test string-6.58 {string is integer, false on bad octal} { - list [string is integer -fail var 036963] $var -} {0 3} + list [string is integer -fail var 0o36963] $var +} {0 4} test string-6.58.1 {string is integer, false on bad octal} { list [string is integer -fail var 0o36963] $var } {0 4} @@ -650,8 +650,8 @@ test string-6.104 {string is wideinteger, false} { list [string is wideinteger -fail var " "] $var } {0 0} test string-6.105 {string is wideinteger, false on bad octal} { - list [string is wideinteger -fail var 036963] $var -} {0 3} + list [string is wideinteger -fail var 0o36963] $var +} {0 4} test string-6.105.1 {string is wideinteger, false on bad octal} { list [string is wideinteger -fail var 0o36963] $var } {0 4} |