## run some test suite
myTestSuite <- defineTestSuite("RUnit Example", system.file("examples", package="RUnit"), testFileRegexp="correctTestCase.r")
testResult <- runTestSuite(myTestSuite)
## prints detailed text protocol
## to standard out:
printTextProtocol(testResult, showDetails=TRUE)
## for single test files, e.g. outside a package context
testResult2 <- runTestFile(file.path(system.file("examples", package="RUnit"), "correctTestCase.r"))
printTextProtocol(testResult2, showDetails=TRUE)Run the code above in your browser using DataLab