summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2007-02-22 19:49:20 (GMT)
committerandreas_kupries <akupries@shaw.ca>2007-02-22 19:49:20 (GMT)
commit2623108238a50c686afa57711980b852d530d304 (patch)
treedd3490accca6e38e4008aea4c0c6e5fd342190bd
parent6ad116f411885307607d5bebcd6a987ebfafff40 (diff)
downloadtcl-2623108238a50c686afa57711980b852d530d304.zip
tcl-2623108238a50c686afa57711980b852d530d304.tar.gz
tcl-2623108238a50c686afa57711980b852d530d304.tar.bz2
* tests/pkg.test: Added tests for the case of an alpha package
satisfying a require for the regular package, demonstrating a corner case specified in TIP#280. More notes in the comments to the test.
-rw-r--r--ChangeLog7
-rw-r--r--tests/pkg.test18
2 files changed, 24 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f282782..4224546 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-02-22 Andreas Kupries <andreask@activestate.com>
+
+ * tests/pkg.test: Added tests for the case of an alpha package
+ satisfying a require for the regular package, demonstrating a
+ corner case specified in TIP#280. More notes in the comments to
+ the test.
+
2007-02-20 Jan Nijtmans <nijtmans@users.sf.net>
* generic/tclInt.decls: Added "const" specifiers in TclSockGetPort
diff --git a/tests/pkg.test b/tests/pkg.test
index 6c27e5f..54ca99b 100644
--- a/tests/pkg.test
+++ b/tests/pkg.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: pkg.test,v 1.23 2006/12/05 15:36:12 dgp Exp $
+# RCS: @(#) $Id: pkg.test,v 1.24 2007/02/22 19:49:20 andreas_kupries Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -965,8 +965,24 @@ test package-vcompare-2.0 {package vcompare at 32bit boundary} {
package vcompare [expr {1<<31}] [expr {(1<<31)-1}]
} 1
+# Note: It is correct that the result of the very first test,
+# i.e. "5.0 5.01" is 1, i.e. that version 5.0a1 satisifes a 5.0
+# requirement.
+
+# The requirement "5.0" internally translates first to "5.0-6", and
+# then to its final form of "5.0a0-6a0". These translations are
+# explicitly specified by the TIP (Search for "padded/extended
+# internally with 'a0'"). This was done intentionally for exactly the
+# tested case, that an alpha package can satisfy a requirement for the
+# regular package. An example would be a package FOO requiring Tcl 8.X
+# for its operation. It can be used with Tcl 8.Xa0. Without our
+# translation that would not be possible.
+
set n 0
foreach {required provided satisfied} {
+ 5.0 5.0a0 1
+ 5.0a0 5.0 1
+
8.5a0- 8.5a5 1
8.5a0- 8.5b1 1
8.5a0- 8.5.1 1