summaryrefslogtreecommitdiffstats
path: root/tests/mathop.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-10-15 21:27:47 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-10-15 21:27:47 (GMT)
commit7222d685f8f460bfd8edb01515a8d6ad5e5c60a3 (patch)
tree660da6ea51654bcc0e6047863d9213d28f2694a4 /tests/mathop.test
parent03bf8aafa026b3996c8907876f76f3b43d77da04 (diff)
downloadtcl-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/mathop.test')
-rw-r--r--tests/mathop.test66
1 files changed, 33 insertions, 33 deletions
diff --git a/tests/mathop.test b/tests/mathop.test
index 8bbebd9..7fe140b 100644
--- a/tests/mathop.test
+++ b/tests/mathop.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: mathop.test,v 1.9 2007/09/09 16:51:19 dgp Exp $
+# RCS: @(#) $Id: mathop.test,v 1.10 2007/10/15 21:27:50 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2.1
@@ -127,10 +127,10 @@ namespace eval ::testmathop {
+ 0 nan
} -result {can't use non-numeric floating-point value as operand of "+"}
test mathop-1.15 {compiled +: errors} -returnCodes error -body {
- + 08 0
+ + 0o8 0
} -result {can't use invalid octal number as operand of "+"}
test mathop-1.16 {compiled +: errors} -returnCodes error -body {
- + 0 08
+ + 0 0o8
} -result {can't use invalid octal number as operand of "+"}
test mathop-1.17 {compiled +: errors} -returnCodes error -body {
+ 0 [error expectedError]
@@ -165,10 +165,10 @@ namespace eval ::testmathop {
$op 0 nan
} -result {can't use non-numeric floating-point value as operand of "+"}
test mathop-1.33 {interpreted +: errors} -returnCodes error -body {
- $op 08 0
+ $op 0o8 0
} -result {can't use invalid octal number as operand of "+"}
test mathop-1.34 {interpreted +: errors} -returnCodes error -body {
- $op 0 08
+ $op 0 0o8
} -result {can't use invalid octal number as operand of "+"}
test mathop-1.35 {interpreted +: errors} -returnCodes error -body {
$op 0 [error expectedError]
@@ -202,10 +202,10 @@ namespace eval ::testmathop {
* 0 nan
} -result {can't use non-numeric floating-point value as operand of "*"}
test mathop-2.15 {compiled *: errors} -returnCodes error -body {
- * 08 0
+ * 0o8 0
} -result {can't use invalid octal number as operand of "*"}
test mathop-2.16 {compiled *: errors} -returnCodes error -body {
- * 0 08
+ * 0 0o8
} -result {can't use invalid octal number as operand of "*"}
test mathop-2.17 {compiled *: errors} -returnCodes error -body {
* 0 [error expectedError]
@@ -240,10 +240,10 @@ namespace eval ::testmathop {
$op 0 nan
} -result {can't use non-numeric floating-point value as operand of "*"}
test mathop-2.33 {interpreted *: errors} -returnCodes error -body {
- $op 08 0
+ $op 0o8 0
} -result {can't use invalid octal number as operand of "*"}
test mathop-2.34 {interpreted *: errors} -returnCodes error -body {
- $op 0 08
+ $op 0 0o8
} -result {can't use invalid octal number as operand of "*"}
test mathop-2.35 {interpreted *: errors} -returnCodes error -body {
$op 0 [error expectedError]
@@ -384,9 +384,9 @@ namespace eval ::testmathop {
& 1 2 3.0
} -result {can't use floating-point value as operand of "&"}
test mathop-6.7 {compiled &} { & 100000000002 18 -126 } 2
- test mathop-6.8 {compiled &} { & 0xff 0377 333333333333 } 85
+ test mathop-6.8 {compiled &} { & 0xff 0o377 333333333333 } 85
test mathop-6.9 {compiled &} { & 1000000000000000000002 18 -126 } 2
- test mathop-6.10 {compiled &} { & 0xff 0377 3333333333333333333333 } 85
+ test mathop-6.10 {compiled &} { & 0xff 0o377 3333333333333333333333 } 85
test mathop-6.11 {compiled &: errors} -returnCodes error -body {
& x 0
} -result {can't use non-numeric string as operand of "&"}
@@ -400,10 +400,10 @@ namespace eval ::testmathop {
& 0 nan
} -result {can't use non-numeric floating-point value as operand of "&"}
test mathop-6.15 {compiled &: errors} -returnCodes error -body {
- & 08 0
+ & 0o8 0
} -result {can't use invalid octal number as operand of "&"}
test mathop-6.16 {compiled &: errors} -returnCodes error -body {
- & 0 08
+ & 0 0o8
} -result {can't use invalid octal number as operand of "&"}
test mathop-6.17 {compiled &: errors} -returnCodes error -body {
& 0 [error expectedError]
@@ -426,9 +426,9 @@ namespace eval ::testmathop {
$op 1 2 3.0
} -result {can't use floating-point value as operand of "&"}
test mathop-6.25 {interpreted &} { $op 100000000002 18 -126 } 2
- test mathop-6.26 {interpreted &} { $op 0xff 0377 333333333333 } 85
+ test mathop-6.26 {interpreted &} { $op 0xff 0o377 333333333333 } 85
test mathop-6.27 {interpreted &} { $op 1000000000000000000002 18 -126 } 2
- test mathop-6.28 {interpreted &} { $op 0xff 0377 3333333333333333333333 } 85
+ test mathop-6.28 {interpreted &} { $op 0xff 0o377 3333333333333333333333 } 85
test mathop-6.29 {interpreted &: errors} -returnCodes error -body {
$op x 0
} -result {can't use non-numeric string as operand of "&"}
@@ -442,10 +442,10 @@ namespace eval ::testmathop {
$op 0 nan
} -result {can't use non-numeric floating-point value as operand of "&"}
test mathop-6.33 {interpreted &: errors} -returnCodes error -body {
- $op 08 0
+ $op 0o8 0
} -result {can't use invalid octal number as operand of "&"}
test mathop-6.34 {interpreted &: errors} -returnCodes error -body {
- $op 0 08
+ $op 0 0o8
} -result {can't use invalid octal number as operand of "&"}
test mathop-6.35 {interpreted &: errors} -returnCodes error -body {
$op 0 [error expectedError]
@@ -494,9 +494,9 @@ namespace eval ::testmathop {
| 1 2 3.0
} -result {can't use floating-point value as operand of "|"}
test mathop-7.7 {compiled |} { | 100000000002 18 -126 } -110
- test mathop-7.8 {compiled |} { | 0xff 0377 333333333333 } 333333333503
+ test mathop-7.8 {compiled |} { | 0xff 0o377 333333333333 } 333333333503
test mathop-7.9 {compiled |} { | 1000000000000000000002 18 -126 } -110
- test mathop-7.10 {compiled |} { | 0xff 0377 3333333333333333333333 } 3333333333333333333503
+ test mathop-7.10 {compiled |} { | 0xff 0o377 3333333333333333333333 } 3333333333333333333503
test mathop-7.11 {compiled |: errors} -returnCodes error -body {
| x 0
} -result {can't use non-numeric string as operand of "|"}
@@ -510,10 +510,10 @@ namespace eval ::testmathop {
| 0 nan
} -result {can't use non-numeric floating-point value as operand of "|"}
test mathop-7.15 {compiled |: errors} -returnCodes error -body {
- | 08 0
+ | 0o8 0
} -result {can't use invalid octal number as operand of "|"}
test mathop-7.16 {compiled |: errors} -returnCodes error -body {
- | 0 08
+ | 0 0o8
} -result {can't use invalid octal number as operand of "|"}
test mathop-7.17 {compiled |: errors} -returnCodes error -body {
| 0 [error expectedError]
@@ -536,9 +536,9 @@ namespace eval ::testmathop {
$op 1 2 3.0
} -result {can't use floating-point value as operand of "|"}
test mathop-7.25 {interpreted |} { $op 100000000002 18 -126 } -110
- test mathop-7.26 {interpreted |} { $op 0xff 0377 333333333333 } 333333333503
+ test mathop-7.26 {interpreted |} { $op 0xff 0o377 333333333333 } 333333333503
test mathop-7.27 {interpreted |} { $op 1000000000000000000002 18 -126 } -110
- test mathop-7.28 {interpreted |} { $op 0xff 0377 3333333333333333333333 } 3333333333333333333503
+ test mathop-7.28 {interpreted |} { $op 0xff 0o377 3333333333333333333333 } 3333333333333333333503
test mathop-7.29 {interpreted |: errors} -returnCodes error -body {
$op x 0
} -result {can't use non-numeric string as operand of "|"}
@@ -552,10 +552,10 @@ namespace eval ::testmathop {
$op 0 nan
} -result {can't use non-numeric floating-point value as operand of "|"}
test mathop-7.33 {interpreted |: errors} -returnCodes error -body {
- $op 08 0
+ $op 0o8 0
} -result {can't use invalid octal number as operand of "|"}
test mathop-7.34 {interpreted |: errors} -returnCodes error -body {
- $op 0 08
+ $op 0 0o8
} -result {can't use invalid octal number as operand of "|"}
test mathop-7.35 {interpreted |: errors} -returnCodes error -body {
$op 0 [error expectedError]
@@ -604,9 +604,9 @@ namespace eval ::testmathop {
^ 1 2 3.0
} -result {can't use floating-point value as operand of "^"}
test mathop-8.7 {compiled ^} { ^ 100000000002 18 -126 } -100000000110
- test mathop-8.8 {compiled ^} { ^ 0xff 0377 333333333333 } 333333333333
+ test mathop-8.8 {compiled ^} { ^ 0xff 0o377 333333333333 } 333333333333
test mathop-8.9 {compiled ^} { ^ 1000000000000000000002 18 -126 } -1000000000000000000110
- test mathop-8.10 {compiled ^} { ^ 0xff 0377 3333333333333333333333 } 3333333333333333333333
+ test mathop-8.10 {compiled ^} { ^ 0xff 0o377 3333333333333333333333 } 3333333333333333333333
test mathop-8.11 {compiled ^: errors} -returnCodes error -body {
^ x 0
} -result {can't use non-numeric string as operand of "^"}
@@ -620,10 +620,10 @@ namespace eval ::testmathop {
^ 0 nan
} -result {can't use non-numeric floating-point value as operand of "^"}
test mathop-8.15 {compiled ^: errors} -returnCodes error -body {
- ^ 08 0
+ ^ 0o8 0
} -result {can't use invalid octal number as operand of "^"}
test mathop-8.16 {compiled ^: errors} -returnCodes error -body {
- ^ 0 08
+ ^ 0 0o8
} -result {can't use invalid octal number as operand of "^"}
test mathop-8.17 {compiled ^: errors} -returnCodes error -body {
^ 0 [error expectedError]
@@ -646,9 +646,9 @@ namespace eval ::testmathop {
$op 1 2 3.0
} -result {can't use floating-point value as operand of "^"}
test mathop-8.25 {interpreted ^} { $op 100000000002 18 -126 } -100000000110
- test mathop-8.26 {interpreted ^} { $op 0xff 0377 333333333333 } 333333333333
+ test mathop-8.26 {interpreted ^} { $op 0xff 0o377 333333333333 } 333333333333
test mathop-8.27 {interpreted ^} { $op 1000000000000000000002 18 -126 } -1000000000000000000110
- test mathop-8.28 {interpreted ^} { $op 0xff 0377 3333333333333333333333 } 3333333333333333333333
+ test mathop-8.28 {interpreted ^} { $op 0xff 0o377 3333333333333333333333 } 3333333333333333333333
test mathop-8.29 {interpreted ^: errors} -returnCodes error -body {
$op x 0
} -result {can't use non-numeric string as operand of "^"}
@@ -662,10 +662,10 @@ namespace eval ::testmathop {
$op 0 nan
} -result {can't use non-numeric floating-point value as operand of "^"}
test mathop-8.33 {interpreted ^: errors} -returnCodes error -body {
- $op 08 0
+ $op 0o8 0
} -result {can't use invalid octal number as operand of "^"}
test mathop-8.34 {interpreted ^: errors} -returnCodes error -body {
- $op 0 08
+ $op 0 0o8
} -result {can't use invalid octal number as operand of "^"}
test mathop-8.35 {interpreted ^: errors} -returnCodes error -body {
$op 0 [error expectedError]