diff options
author | donal.k.fellows@manchester.ac.uk <dkf> | 2015-10-23 22:30:57 (GMT) |
---|---|---|
committer | donal.k.fellows@manchester.ac.uk <dkf> | 2015-10-23 22:30:57 (GMT) |
commit | cfdcca3ad998dcf023933b3f9421ae445ccdc47a (patch) | |
tree | 6fcf1d911bc9e4fe97ac30aa69760179118fdb25 | |
parent | 71b3d308daab325d886977a876220ce969d182fa (diff) | |
download | tcl-cfdcca3ad998dcf023933b3f9421ae445ccdc47a.zip tcl-cfdcca3ad998dcf023933b3f9421ae445ccdc47a.tar.gz tcl-cfdcca3ad998dcf023933b3f9421ae445ccdc47a.tar.bz2 |
Ensure that at lease the format of the output of the platform package's commands is consistently parsable.
-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 |