summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-12-19 19:03:16 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-12-19 19:03:16 (GMT)
commitdaebf10e2ccb834224974521717da8f39bc873d1 (patch)
tree0a12925e93451c4a8954efb8eae7c1f973c9a1ff /tests
parentb2d1f7871ac602e36507ea0beab5868e1af45733 (diff)
downloadtcl-daebf10e2ccb834224974521717da8f39bc873d1.zip
tcl-daebf10e2ccb834224974521717da8f39bc873d1.tar.gz
tcl-daebf10e2ccb834224974521717da8f39bc873d1.tar.bz2
2005-12-19 Don Porter <dgp@users.sourceforge.net>
* generic/tclCmdMZ.c: Modified [string is double] to use * tests/string.test: TclParseNumber() to parse trailing whitespace. Ensures consistency, and makes it easier to cleanup after invalid internal reps left behind by parsing [Bugs 1360432 1382287]. * generic/tclParseExpr.c: Added TCL_PARSE_NO_WHITESPACE to * generic/tclScan.c: TclParseNumber() calls since [scan] and * tests/scan.test: [expr] parsing don't want spaces in parsed numbers. * generic/tclInt.h: Added TCL_PARSE_NO_WHITESPACE flag to the * generic/tclStrToD.c: TclParseNumber() interface.
Diffstat (limited to 'tests')
-rw-r--r--tests/scan.test10
-rw-r--r--tests/string.test10
2 files changed, 17 insertions, 3 deletions
diff --git a/tests/scan.test b/tests/scan.test
index 97c6d04..5bc986c 100644
--- a/tests/scan.test
+++ b/tests/scan.test
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: scan.test,v 1.18 2005/10/08 14:42:54 dgp Exp $
+# RCS: @(#) $Id: scan.test,v 1.19 2005/12/19 19:03:17 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -606,6 +606,12 @@ test scan-10.5 {miscellaneous tests} {
set arr(2) {}
list [catch {scan ab%c14 ab%%c%d arr(2)} msg] $msg $arr(2)
} {0 1 14}
+test scan-10.6 {miscellaneous tests} {
+ scan 5a {%i%[a]}
+} {5 a}
+test scan-10.7 {miscellaneous tests} {
+ scan {5 a} {%i%[a]}
+} {5 {}}
test scan-11.1 {alignment in results array (TCL_ALIGN)} {
scan "123 13.6" "%s %f" a b
@@ -758,4 +764,4 @@ return
# Local Variables:
# mode: tcl
-# End: \ No newline at end of file
+# End:
diff --git a/tests/string.test b/tests/string.test
index cc43191..a461a5e 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.54 2005/11/09 20:24:11 dgp Exp $
+# RCS: @(#) $Id: string.test,v 1.55 2005/12/19 19:03:17 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -661,6 +661,14 @@ test string-6.107 {string is integer, bad integers} {
}
set result
} {1 1 0 0 0 1 0 0}
+test string-6.108 {string is double, Bug 1382287} {
+ set x 2turtledoves
+ string is double $x
+ string is double $x
+} 0
+test string-6.109 {string is double, Bug 1360532} {
+ string is double 1\u00a0
+} 0
catch {rename largest_int {}}