diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2015-10-23 22:30:57 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2015-10-23 22:30:57 (GMT) |
commit | 116ec0f471408695825f3eb2b234119d39c1e42f (patch) | |
tree | 6fcf1d911bc9e4fe97ac30aa69760179118fdb25 /tests | |
parent | f5599d7f8d93b652f65991aa1923e1acca4561c4 (diff) | |
download | tcl-116ec0f471408695825f3eb2b234119d39c1e42f.zip tcl-116ec0f471408695825f3eb2b234119d39c1e42f.tar.gz tcl-116ec0f471408695825f3eb2b234119d39c1e42f.tar.bz2 |
Ensure that at lease the format of the output of the platform package's commands is consistently parsable.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/platform.test | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/platform.test b/tests/platform.test index ab82d07..b5ddc48 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 @@ -54,6 +54,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 |