summaryrefslogtreecommitdiffstats
path: root/tests/platform.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2015-10-23 22:44:31 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2015-10-23 22:44:31 (GMT)
commitfa55d6d012bbf4fb7847db0a29710fa0bcd15d5c (patch)
tree53e0ed6f1bf22b896d797015c75e85d66c1700b8 /tests/platform.test
parent31aafac92405d7c54cdb4615d1eed6dd9362c4f9 (diff)
parent357ca2067d11e6a7520d106c5b06158caeecdf5b (diff)
downloadtcl-fa55d6d012bbf4fb7847db0a29710fa0bcd15d5c.zip
tcl-fa55d6d012bbf4fb7847db0a29710fa0bcd15d5c.tar.gz
tcl-fa55d6d012bbf4fb7847db0a29710fa0bcd15d5c.tar.bz2
Mend problems with [platform::identify] formatting.
Diffstat (limited to 'tests/platform.test')
-rw-r--r--tests/platform.test13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/platform.test b/tests/platform.test
index 6596975..2b98975 100644
--- a/tests/platform.test
+++ b/tests/platform.test
@@ -1,4 +1,4 @@
-# The file tests the tcl_platform variable
+# The file tests the tcl_platform variable and platform package.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands. Sourcing this file into Tcl runs the tests and
@@ -57,6 +57,17 @@ test platform-3.1 {CPU ID on Windows/UNIX} \
-match regexp \
-result {^(?:AuthenticAMD|CentaurHauls|CyrixInstead|GenuineIntel)$}
+# The platform package makes very few promises, but does promise that the
+# format of string it produces consists of two non-empty words separated by a
+# hyphen.
+package require platform
+test platform-4.1 {format of platform::identify result} -match regexp -body {
+ platform::identify
+} -result {^[^-]+-[^-]+$}
+test platform-4.2 {format of platform::generic result} -match regexp -body {
+ platform::generic
+} -result {^[^-]+-[^-]+$}
+
# cleanup
cleanupTests