[rkward-cvs] SF.net SVN: rkward:[3125] trunk/rkward/rkward/rbackend/rpackages/ rkwardtests

m-eik at users.sourceforge.net m-eik at users.sourceforge.net
Thu Oct 14 19:52:34 UTC 2010


Revision: 3125
          http://rkward.svn.sourceforge.net/rkward/?rev=3125&view=rev
Author:   m-eik
Date:     2010-10-14 19:52:33 +0000 (Thu, 14 Oct 2010)

Log Message:
-----------
rkwardtests: now uses temp folders for results; new function rktest.replaceRunAgainLink()

Modified Paths:
--------------
    trunk/rkward/rkward/rbackend/rpackages/rkwardtests/DESCRIPTION
    trunk/rkward/rkward/rbackend/rpackages/rkwardtests/NAMESPACE
    trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rktest.makeplugintests.R
    trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rktest.runRKTestSuite.R
    trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rktest.setSuiteStandards.R
    trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-internal.R
    trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-package.R
    trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/rktest.makeplugintests.Rd
    trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/rktest.setSuiteStandards.Rd
    trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/rkwardtests-package.Rd

Added Paths:
-----------
    trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rktest.replaceRunAgainLink.R
    trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/rktest.replaceRunAgainLink.Rd

Removed Paths:
-------------
    trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rk.rerun.plugin.link.replacement.R
    trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/rk.rerun.plugin.link.replacement.Rd

Modified: trunk/rkward/rkward/rbackend/rpackages/rkwardtests/DESCRIPTION
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwardtests/DESCRIPTION	2010-10-14 14:54:41 UTC (rev 3124)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwardtests/DESCRIPTION	2010-10-14 19:52:33 UTC (rev 3125)
@@ -2,7 +2,7 @@
 Type: Package
 Title: RKWard Plugin Test Suite Framework
 Version: 0.5.5
-Date: 2010-10-12
+Date: 2010-10-14
 Author: Thomas Friedrichsmeier, Meik Michalke
 Maintainer: Thomas Friedrichsmeier <thomas.friedrichsmeier at ruhr-uni-bochum.de>, Meik Michalke <meik.michalke at uni-duesseldorf.de>
 Depends: R (>= 2.9.0),methods

Modified: trunk/rkward/rkward/rbackend/rpackages/rkwardtests/NAMESPACE
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwardtests/NAMESPACE	2010-10-14 14:54:41 UTC (rev 3124)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwardtests/NAMESPACE	2010-10-14 19:52:33 UTC (rev 3125)
@@ -1,7 +1,7 @@
-export(.rk.rerun.plugin.link.replacement)
 import(methods)
 exportClasses(RKTest)
 export(rktest.makeplugintests)
+export(rktest.replaceRunAgainLink)
 exportClasses(RKTestResult)
 export(rktest.runRKTestSuite)
 export(rktest.setSuiteStandards)

Deleted: trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rk.rerun.plugin.link.replacement.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rk.rerun.plugin.link.replacement.R	2010-10-14 14:54:41 UTC (rev 3124)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rk.rerun.plugin.link.replacement.R	2010-10-14 19:52:33 UTC (rev 3125)
@@ -1,39 +0,0 @@
-#' Replace "Run again" link in RKWard with code
-#'
-#' You can use this to temporarily replace .rk.rerun.plugin.link (see example below).
-#' This way, after running a plugin, you are shown the call needed to run this
-#' plugin with those settings, instead of the link.
-#'
-#' This code can be used in a plugin test suite.
-#' 
-#' @title Replace "Run again" link in RKWard
-#' @usage .rk.rerun.plugin.link <- .rk.rerun.plugin.link.replacement
-#' @aliases .rk.rerun.plugin.link.replacement
-#' @param plugin (used internally)
-#' @param settings (used internally)
-#' @param label (used internally)
-#' @return Replaces the "Run again" link in RKWard with the code that would have been called.
-#' @docType function
-#' @author Thomas Friedrichsmeier \email{thomas.friedrichsmeier@@ruhr-uni-bochum.de}
-#' @keywords utilities
-#' @seealso \code{\link[rkwardtests:RKTestSuite]{RKTestSuite-class}}, \code{\link[rkwardtests:rktest.makeplugintests]{rktest.makeplugintests}}
-#' @export
-#' @rdname rk.rerun.plugin.link.replacement
-#' @examples
-#' \dontrun{
-#' # NOTE: Do NOT end the function with brackets, as its code has to be
-#' # written into .rk.rerun.plugin.link
-#' .rk.rerun.plugin.link <- .rk.rerun.plugin.link.replacement
-#' }
-
-.rk.rerun.plugin.link.replacement <- function (plugin, settings, label) {
-	.rk.cat.output ("<h3>Rerun code:</h3>")
-	.rk.cat.output ("<pre>")
-	.rk.cat.output ("rk.call.plugin (\"")
-	.rk.cat.output (plugin)
-	.rk.cat.output ("\", ")
-	.rk.cat.output (gsub ("^\"", "", gsub ("=", "=\"", gsub ("\n", "\", ", settings))))
-	.rk.cat.output ("\", submit.mode=\"submit\")</pre>")
-}
-
-

Modified: trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rktest.makeplugintests.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rktest.makeplugintests.R	2010-10-14 14:54:41 UTC (rev 3124)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rktest.makeplugintests.R	2010-10-14 19:52:33 UTC (rev 3125)
@@ -3,14 +3,14 @@
 #' The function \code{rktest.makeplugintests} will run a whole test suite that was prepared to check one or several RKWard plugins.
 #' 
 #' @title Run RKWard plugin test suite
-#' @usage rktest.makeplugintests(testsuites, testroot,
+#' @usage rktest.makeplugintests(testsuites="testsuite.R", testroot=getwd(),
 #' outfile="make_plugintests.txt", append=FALSE, test.id=NULL)
 #' @aliases rktest.makeplugintests
 #' @param testsuites A character string or vector naming the test suites to be run.
 #' @param testroot A character string pointing to the root directory where the test suite resides (including its folder with test standards).
 #' @param outfile A character string giving a file name for the result log.
 #' @param append If TRUE, append output to an existing file.
-#' @param test.id An optional character string or vector naming one or more tests of a suite to be run (if NULL, all tests are run).
+#' @param test.id Optional character string or vector naming one or more tests of a suite to be run (if NULL, all tests are run).
 #' @return Results are printed to stdout and saved to the defined output file.
 #' @docType function
 #' @author Thomas Friedrichsmeier \email{thomas.friedrichsmeier@@ruhr-uni-bochum.de}, Meik Michalke \email{meik.michalke@@uni-duesseldorf.de}
@@ -25,7 +25,7 @@
 #'   testroot=getwd(), test.id=c("poisson_quantiles", "geom_quantiles"))
 #' }
 
-rktest.makeplugintests <- function(testsuites, testroot, outfile="make_plugintests.txt", append=FALSE, test.id=NULL){
+rktest.makeplugintests <- function(testsuites="testsuite.R", testroot=getwd(), outfile="make_plugintests.txt", append=FALSE, test.id=NULL){
   ## change to test root directory
   oldwd <- getwd()
   on.exit(setwd(oldwd))
@@ -63,5 +63,6 @@
   sink()
 
   cat (paste ("\n\nThese output are saved in: ", paste (getwd(), outfile, sep=.Platform$file.sep), ".\nIf needed, send them to rkward-devel at lists.sourceforge.net\n", sep=""))
+  cat (paste("\nThe full test results have been saved to this temporary directory:\n", rktest.getTempDir(),"\n"))
 
 }
\ No newline at end of file

Added: trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rktest.replaceRunAgainLink.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rktest.replaceRunAgainLink.R	                        (rev 0)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rktest.replaceRunAgainLink.R	2010-10-14 19:52:33 UTC (rev 3125)
@@ -0,0 +1,46 @@
+#' Replace "Run again" link in RKWard with code
+#'
+#' You can use this to temporarily replace .rk.rerun.plugin.link (see example below).
+#' This way, after running a plugin, you are shown the call needed to run this
+#' plugin with those settings, instead of the link.
+#'
+#' This code can be used in a plugin test suite.
+#' 
+#' @title Replace "Run again" link in RKWard
+#' @usage rktest.replaceRunAgainLink(restore=FALSE)
+#' @aliases .rk.rerun.plugin.link.replacement
+#' @param restore Logical: If TRUE, restore the original behaviour.
+#' @return Replaces the "Run again" link in RKWard with the code that would have been called, or vice versa.
+#' @docType function
+#' @author Thomas Friedrichsmeier \email{thomas.friedrichsmeier@@ruhr-uni-bochum.de}, Meik Michalke \email{meik.michalke@@uni-duesseldorf.de}
+#' @keywords utilities
+#' @seealso \code{\link[rkwardtests:RKTestSuite]{RKTestSuite-class}}, \code{\link[rkwardtests:rktest.makeplugintests]{rktest.makeplugintests}}
+#' @export
+#' @rdname rktest.replaceRunAgainLink
+#' @examples
+#' rktest.replaceRunAgainLink()
+#' }
+
+rktest.replaceRunAgainLink <- function(restore=FALSE){
+  if(!restore){
+    # check if there's already a backup
+    if(!exists(".rktest.replaceRunAgainLink.restore", where=globalenv())){
+      replace <- get(".rk.rerun.plugin.link", pos=globalenv())
+      assign(".rktest.replaceRunAgainLink.restore", replace, envir=globalenv())
+      assign(".rk.rerun.plugin.link", .rk.rerun.plugin.link.replacement, envir=globalenv())
+    }
+    else {
+      stop(simpleWarning("Found a backup to restore -- have you already replaced the link?"))
+    }
+  }
+  else {
+    if(exists(".rktest.replaceRunAgainLink.restore", where=globalenv())){
+      restore <- get(".rktest.replaceRunAgainLink.restore", pos=globalenv())
+      assign(".rk.rerun.plugin.link", restore, envir=globalenv())
+      rm(".rktest.replaceRunAgainLink.restore", pos=globalenv())
+    }
+    else {
+      stop(simpleWarning("No backup to restore found!"))
+    }
+  }
+}

Modified: trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rktest.runRKTestSuite.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rktest.runRKTestSuite.R	2010-10-14 14:54:41 UTC (rev 3124)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rktest.runRKTestSuite.R	2010-10-14 19:52:33 UTC (rev 3125)
@@ -37,7 +37,7 @@
 
 	oldwd = getwd ()
 	on.exit (setwd (oldwd), add=TRUE)
-	setwd (paste (basedir, suite at id, sep="/"))
+	setwd (file.path(basedir, suite at id))
 
 	if (length (suite at initCalls) > 0) {
 		for (i in 1:length (suite at initCalls)) try (suite at initCalls[[i]]())

Modified: trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rktest.setSuiteStandards.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rktest.setSuiteStandards.R	2010-10-14 14:54:41 UTC (rev 3124)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rktest.setSuiteStandards.R	2010-10-14 19:52:33 UTC (rev 3125)
@@ -7,7 +7,7 @@
 #' @usage rktest.setSuiteStandards(suite, basedir=getwd())
 #' @aliases rktest.setSuiteStandards
 #' @param suite Character string naming the test suite to set standards for.
-#' @param basedir Defaults to the working directory.
+#' @param basedir Should point to the testroot, defaults to the working directory.
 #' @return The function simply changes the names of the previously created files,
 #' specifically adding the prefix "RKTestStandard.".
 #' @docType function
@@ -17,7 +17,7 @@
 #' @export
 #' @examples
 #' \dontrun{
-#' rktest.setSuiteStandards()
+#' rktest.setSuiteStandards("rkward_application_tests.R")
 #' }
 
 rktest.setSuiteStandards <- function (suite, basedir=getwd ()) {
@@ -29,12 +29,12 @@
 
 	oldwd = getwd ()
 	on.exit (setwd (oldwd))
-	setwd (paste (basedir, suite at id, sep="/"))
+	setwd (file.path(basedir, suite at id))
 
-	files <- list.files ()
+	temp.suite.dir <- rktest.createTempSuiteDir(suite at id)
+	files <- list.files (temp.suite.dir)
 	files <- grep ("\\.(messages.txt|rkcommands.R|rkout)$", files, value=TRUE)
-	files <- grep ("^RKTestStandard", files, value=TRUE, invert=TRUE)
-	file.copy (files, paste ("RKTestStandard.", files, sep=""), overwrite=TRUE)
+	file.copy (file.path(temp.suite.dir, files), paste ("RKTestStandard.", files, sep=""), overwrite=TRUE)
 
 	# clean anything that is *not* a standard file
 	rktest.cleanRKTestSuite (suite, basedir)

Modified: trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-internal.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-internal.R	2010-10-14 14:54:41 UTC (rev 3124)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-internal.R	2010-10-14 19:52:33 UTC (rev 3125)
@@ -1,5 +1,15 @@
 # these functions are all used internally 
 
+.rk.rerun.plugin.link.replacement <- function (plugin, settings, label) {
+	.rk.cat.output ("<h3>Rerun code:</h3>")
+	.rk.cat.output ("<pre>")
+	.rk.cat.output ("rk.call.plugin (\"")
+	.rk.cat.output (plugin)
+	.rk.cat.output ("\", ")
+	.rk.cat.output (gsub ("^\"", "", gsub ("=", "=\"", gsub ("\n", "\", ", settings))))
+	.rk.cat.output ("\", submit.mode=\"submit\")</pre>")
+}
+
 rktest.appendTestResults <- function (objecta, objectb) {
 	stopifnot (inherits (objecta, "RKTestResult") && validObject (objecta))
 	stopifnot (inherits (objectb, "RKTestResult") && validObject (objectb))
@@ -18,12 +28,14 @@
 }
 
 rktest.file <- function (id, extension) {
-	file.path(getwd(), paste (id, extension, sep=""))
+	# get or create a temporary directory
+	temp.suite.dir <- rktest.createTempSuiteDir(suite at id)
+	file.path(temp.suite.dir, paste (id, extension, sep=""))
 }
 
 # returns true, if file corresponds to standard.
 rktest.compare.against.standard <- function (file, fuzzy=FALSE) {
-	standard_file <- gsub ("^(.*\\/)([^\\/]*)$", "\\1RKTestStandard\\.\\2", file)
+	standard_file <- file.path(getwd(), gsub ("^(.*\\/)([^\\/]*)$", "RKTestStandard\\.\\2", file))
 	if (file.exists (file)) {
 		# purge empty files
 		info <- file.info (file)
@@ -136,17 +148,9 @@
 }
 
 rktest.cleanRKTestSuite <- function (suite, basedir=getwd ()) {
-	oldwd = getwd ()
-	on.exit (setwd (oldwd))
-	setwd (paste (basedir, suite at id, sep="/"))
-
-	files <-  list.files(pattern="\\.(rkcommands.R|rkout|messages.txt)$")
-	# do not delete the standards!
-	files <- grep ("^RKTestStandard\\.", files, value=TRUE, invert=TRUE)
-
-	unlink (files)
-
-	invisible (NULL)
+      # kept for backwards compatibility ;-)
+      # basedir is superfluous, though
+      rktest.removeTempSuiteDir(suite at id)
 }
 
 ## Initialize test environment
@@ -226,9 +230,6 @@
     return(temp.dir)
   } else{}
   new.temp.dir <- tempfile("rktests.")
-  # to be sure path is treated as a directory, add a trailing slash if omitted
-  if(length(grep("/$", new.temp.dir)) == 0)
-    new.temp.dir <- paste(new.temp.dir,"/", sep="")
 
   if(!dir.create(new.temp.dir, recursive=TRUE)) {
     stop(simpleError("Couldn't create temporary directory!"))
@@ -252,3 +253,48 @@
     return(FALSE)
   }
 }
+
+# create a suite directory inside the temp dir
+# for the actual test files
+rktest.createTempSuiteDir <- function(suite.id){
+  # create or get the temp base dir to use
+  temp.dir <- rktest.createTempDir()
+  temp.suite.dir <- file.path(temp.dir, suite.id)
+  # check if this dir already exists, then just return its path
+  if(file_test("-d", temp.suite.dir)){
+    return(temp.suite.dir)
+  }
+  # if not, try to create it and again return its path
+  else {
+    if(!dir.create(temp.suite.dir, recursive=TRUE)) {
+      stop(simpleError("Couldn't create temporary suite directory!"))
+    }
+    else {
+      return(temp.suite.dir)
+    }
+  }
+}
+
+# remove just the suite temp dir
+rktest.removeTempSuiteDir <- function(suite.id){
+  temp.dir <- rktest.getTempDir()
+  if(is.character(temp.dir)){
+    temp.suite.dir <- file.path(temp.dir, suite.id)
+    # check if this dir exists
+    if(file_test("-d", temp.suite.dir)){
+      unlink(temp.suite.dir, recursive=TRUE)
+      # if nothing is left in the base tempdir now, remove it as well
+      if(length(list.files(temp.dir)) == 0) {
+	rktest.removeTempDir()
+      } else {}
+      return(TRUE)
+    }
+    # if not, return FALSE
+    else {
+      return(FALSE)
+    }
+  }
+  else {
+    return(FALSE)
+  }
+}

Modified: trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-package.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-package.R	2010-10-14 14:54:41 UTC (rev 3124)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-package.R	2010-10-14 19:52:33 UTC (rev 3125)
@@ -4,7 +4,7 @@
 #' Package: \tab rkwardtests\cr
 #' Type: \tab Package\cr
 #' Version: \tab 0.5.5\cr
-#' Date: \tab 2010-10-12\cr
+#' Date: \tab 2010-10-14\cr
 #' Depends: \tab R (>= 2.9.0),methods\cr
 #' Encoding: \tab UTF-8\cr
 #' License: \tab GPL (>= 3)\cr

Deleted: trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/rk.rerun.plugin.link.replacement.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/rk.rerun.plugin.link.replacement.Rd	2010-10-14 14:54:41 UTC (rev 3124)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/rk.rerun.plugin.link.replacement.Rd	2010-10-14 19:52:33 UTC (rev 3125)
@@ -1,26 +0,0 @@
-\name{rk.rerun.plugin.link.replacement}
-\alias{.rk.rerun.plugin.link.replacement}
-\title{Replace "Run again" link in RKWard}
-\usage{.rk.rerun.plugin.link <- .rk.rerun.plugin.link.replacement}
-\description{Replace "Run again" link in RKWard with code}
-\details{You can use this to temporarily replace .rk.rerun.plugin.link (see example below).
-This way, after running a plugin, you are shown the call needed to run this
-plugin with those settings, instead of the link.
-
-This code can be used in a plugin test suite.}
-\alias{.rk.rerun.plugin.link.replacement}
-\value{Replaces the "Run again" link in RKWard with the code that would have been called.}
-\docType{function}
-\author{Thomas Friedrichsmeier \email{thomas.friedrichsmeier at ruhr-uni-bochum.de}}
-\keyword{utilities}
-\seealso{\code{\link[rkwardtests:RKTestSuite]{RKTestSuite-class}}, \code{\link[rkwardtests:rktest.makeplugintests]{rktest.makeplugintests}}}
-\arguments{\item{plugin}{(used internally)}
-\item{settings}{(used internally)}
-\item{label}{(used internally)}
-}
-\examples{\dontrun{
-# NOTE: Do NOT end the function with brackets, as its code has to be
-# written into .rk.rerun.plugin.link
-.rk.rerun.plugin.link <- .rk.rerun.plugin.link.replacement
-}}
-

Modified: trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/rktest.makeplugintests.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/rktest.makeplugintests.Rd	2010-10-14 14:54:41 UTC (rev 3124)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/rktest.makeplugintests.Rd	2010-10-14 19:52:33 UTC (rev 3125)
@@ -1,7 +1,7 @@
 \name{rktest.makeplugintests}
 \alias{rktest.makeplugintests}
 \title{Run RKWard plugin test suite}
-\usage{rktest.makeplugintests(testsuites, testroot,
+\usage{rktest.makeplugintests(testsuites="testsuite.R", testroot=getwd(),
 outfile="make_plugintests.txt", append=FALSE, test.id=NULL)}
 \description{Run a whole RKWard plugin test suite}
 \details{The function \code{rktest.makeplugintests} will run a whole test suite that was prepared to check one or several RKWard plugins.}
@@ -15,7 +15,7 @@
 \item{testroot}{A character string pointing to the root directory where the test suite resides (including its folder with test standards).}
 \item{outfile}{A character string giving a file name for the result log.}
 \item{append}{If TRUE, append output to an existing file.}
-\item{test.id}{An optional character string or vector naming one or more tests of a suite to be run (if NULL, all tests are run).}
+\item{test.id}{Optional character string or vector naming one or more tests of a suite to be run (if NULL, all tests are run).}
 }
 \examples{\dontrun{
 rktest.makeplugintests(testsuites=c("rkward_application_tests.R",

Added: trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/rktest.replaceRunAgainLink.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/rktest.replaceRunAgainLink.Rd	                        (rev 0)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/rktest.replaceRunAgainLink.Rd	2010-10-14 19:52:33 UTC (rev 3125)
@@ -0,0 +1,21 @@
+\name{rktest.replaceRunAgainLink}
+\alias{rktest.replaceRunAgainLink}
+\title{Replace "Run again" link in RKWard}
+\usage{rktest.replaceRunAgainLink(restore=FALSE)}
+\description{Replace "Run again" link in RKWard with code}
+\details{You can use this to temporarily replace .rk.rerun.plugin.link (see example below).
+This way, after running a plugin, you are shown the call needed to run this
+plugin with those settings, instead of the link.
+
+This code can be used in a plugin test suite.}
+\alias{.rk.rerun.plugin.link.replacement}
+\value{Replaces the "Run again" link in RKWard with the code that would have been called, or vice versa.}
+\docType{function}
+\author{Thomas Friedrichsmeier \email{thomas.friedrichsmeier at ruhr-uni-bochum.de}, Meik Michalke \email{meik.michalke at uni-duesseldorf.de}}
+\keyword{utilities}
+\seealso{\code{\link[rkwardtests:RKTestSuite]{RKTestSuite-class}}, \code{\link[rkwardtests:rktest.makeplugintests]{rktest.makeplugintests}}}
+\arguments{\item{restore}{Logical: If TRUE, restore the original behaviour.}
+}
+\examples{rktest.replaceRunAgainLink()
+}}
+

Modified: trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/rktest.setSuiteStandards.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/rktest.setSuiteStandards.Rd	2010-10-14 14:54:41 UTC (rev 3124)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/rktest.setSuiteStandards.Rd	2010-10-14 19:52:33 UTC (rev 3125)
@@ -13,9 +13,9 @@
 \keyword{utilities}
 \seealso{\code{\link[rkwardtests:RKTestSuite]{RKTestSuite-class}}, \code{\link[rkwardtests:rktest.makeplugintests]{rktest.makeplugintests}}}
 \arguments{\item{suite}{Character string naming the test suite to set standards for.}
-\item{basedir}{Defaults to the working directory.}
+\item{basedir}{Should point to the testroot, defaults to the working directory.}
 }
 \examples{\dontrun{
-rktest.setSuiteStandards()
+rktest.setSuiteStandards("rkward_application_tests.R")
 }}
 

Modified: trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/rkwardtests-package.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/rkwardtests-package.Rd	2010-10-14 14:54:41 UTC (rev 3124)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwardtests/man/rkwardtests-package.Rd	2010-10-14 19:52:33 UTC (rev 3125)
@@ -7,7 +7,7 @@
 Package: \tab rkwardtests\cr
 Type: \tab Package\cr
 Version: \tab 0.5.5\cr
-Date: \tab 2010-10-12\cr
+Date: \tab 2010-10-14\cr
 Depends: \tab R (>= 2.9.0),methods\cr
 Encoding: \tab UTF-8\cr
 License: \tab GPL (>= 3)\cr


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list