tests/tclinfo.R

###
### $Id: tclinfo.R 808 2014-06-24 22:44:59Z proebuck $
###

library(tcltk)
library(tclish)


##-----------------------------------------------------------------------------
test.tclinfo <- function(input, expected) {
    output <- do.call(getFromNamespace("tclinfo", "tclish"), input)
    identical(tclvalue(output), expected)
}


## Run tests
tclinfo.hostname.expected <- tolower(Sys.info()[["nodename"]])
test.tclinfo(list("hostname"),
             tclinfo.hostname.expected)

tclinfo.patchlevel <- tclvalue(tclinfo("patchlevel"))
tclinfo.version.expected <- sub("\\.[[:digit:]]*$", "", tclinfo.patchlevel)
test.tclinfo(list("tclversion"),
             tclinfo.version.expected)

Try the tclish package in your browser

Any scripts or data that you put into this service are public.

tclish documentation built on May 2, 2019, 4:53 p.m.