diff options
author | dgp <dgp@users.sourceforge.net> | 2016-04-20 16:44:13 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2016-04-20 16:44:13 (GMT) |
commit | 1bbd13e8395085f6afe23f0ac7d7cc91eae3cade (patch) | |
tree | deba5d0dcb60194537aea304ca412bd52ef3c1b6 /tests/platform.test | |
parent | 66032e8a327e0498b0d8970307452f66c69be25c (diff) | |
parent | 049650b5952e5e5ee1997772750450305dccc6d7 (diff) | |
download | tcl-1bbd13e8395085f6afe23f0ac7d7cc91eae3cade.zip tcl-1bbd13e8395085f6afe23f0ac7d7cc91eae3cade.tar.gz tcl-1bbd13e8395085f6afe23f0ac7d7cc91eae3cade.tar.bz2 |
Merge 8.6.5little
Diffstat (limited to 'tests/platform.test')
-rw-r--r-- | tests/platform.test | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/tests/platform.test b/tests/platform.test index 6596975..c826444 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 @@ -23,6 +23,10 @@ catch [list package require -exact Tcltest [info patchlevel]] testConstraint testCPUID [llength [info commands testcpuid]] +test platform-1.0 {tcl_platform(engine)} { + set tcl_platform(engine) +} {Tcl} + test platform-1.1 {TclpSetVariables: tcl_platform} { interp create i i eval {catch {unset tcl_platform(debug)}} @@ -30,7 +34,7 @@ test platform-1.1 {TclpSetVariables: tcl_platform} { set result [i eval {lsort [array names tcl_platform]}] interp delete i set result -} {byteOrder machine os osVersion pathSeparator platform pointerSize user wordSize} +} {byteOrder engine machine os osVersion pathSeparator platform pointerSize user wordSize} # Test assumes twos-complement arithmetic, which is true of virtually # everything these days. Note that this does *not* use wide(), and @@ -57,6 +61,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 |