summaryrefslogtreecommitdiffstats
path: root/tests/pkg.test
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2006-09-27 20:22:40 (GMT)
committerandreas_kupries <akupries@shaw.ca>2006-09-27 20:22:40 (GMT)
commit8c38009f20bbb6eac54a8d9a6302cb32b695a1e2 (patch)
treef939de038ff53e83062f42714344244c727752b4 /tests/pkg.test
parenta14dc8880490ddf17e78d3eacf6e892dd3dd6a67 (diff)
downloadtcl-8c38009f20bbb6eac54a8d9a6302cb32b695a1e2.zip
tcl-8c38009f20bbb6eac54a8d9a6302cb32b695a1e2.tar.gz
tcl-8c38009f20bbb6eac54a8d9a6302cb32b695a1e2.tar.bz2
* tests/pkg.test: Added test for version comparison at the 32bit
boundary. [SF Tcl Bug 1563836]. * generic/tclPkg.c: [SF Tcl Bug 1563836]. Rewrote CompareVersion to perform string comparison instead of numeric. This breaks through the 32bit limit on version numbers. See code for details (handling of leading zeros, signs, etc.). un-CONSTed some arguments of CompareVersions, RequirementSatisfied, and AllRequirementsSatisfied. The new compare modifies the string (temporary string terminators). All callers use heap-allocated ver-intreps, so we are good with that.
Diffstat (limited to 'tests/pkg.test')
-rw-r--r--tests/pkg.test8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/pkg.test b/tests/pkg.test
index 5f78f2f..ee1c839 100644
--- a/tests/pkg.test
+++ b/tests/pkg.test
@@ -1,3 +1,4 @@
+# -*- tcl -*-
# Commands covered: pkg
#
# This file contains a collection of tests for one or more of the Tcl
@@ -10,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: pkg.test,v 1.17 2006/09/22 18:13:30 andreas_kupries Exp $
+# RCS: @(#) $Id: pkg.test,v 1.18 2006/09/27 20:22:40 andreas_kupries Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -957,6 +958,11 @@ foreach {r p vs vc} {
incr n
}
+test package-vcompare-2.0 {package vcompare at 32bit boundary} {
+ package vcompare [expr {1<<31}] [expr {(1<<31)-1}]
+} 1
+
+
set n 0
foreach {required provided satisfied} {
8.5a0- 8.5a5 1