[rkward-cvs] SF.net SVN: rkward-code:[4588] trunk/rkward/rkward/rbackend/rpackages/ rkwardtests/R/rkwardtests-internal.R
tfry at users.sf.net
tfry at users.sf.net
Wed Mar 13 10:12:48 UTC 2013
Revision: 4588
http://sourceforge.net/p/rkward/code/4588
Author: tfry
Date: 2013-03-13 10:12:47 +0000 (Wed, 13 Mar 2013)
Log Message:
-----------
Make run-again-link-replacement work for optionsets
Modified Paths:
--------------
trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-internal.R
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-internal.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-internal.R 2013-03-12 18:18:03 UTC (rev 4587)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-internal.R 2013-03-13 10:12:47 UTC (rev 4588)
@@ -5,13 +5,23 @@
.rktest.tmp.storage <- new.env()
.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>")
+ .rk.cat.output("<h3>Rerun code:</h3>")
+ .rk.cat.output("<pre>")
+ .rk.cat.output("rk.call.plugin (")
+ .rk.cat.output(dQuote (plugin))
+ .rk.cat.output(", ")
+
+ lines = strsplit (settings, '\n', fixed=TRUE)[[1]]
+ first = TRUE
+ for (line in lines) {
+ if (first) first <- FALSE
+ else .rk.cat.output (", ")
+ split <- strsplit (line, '=', fixed=TRUE)[[1]]
+ key <- split[1]
+ value <- paste (split[-1], collapse="=")
+ .rk.cat.output(paste (key, dQuote (value), sep="="))
+ }
+ .rk.cat.output(", submit.mode=\"submit\")</pre>")
}
rktest.appendTestResults <- function (objecta, objectb) {
More information about the rkward-tracker
mailing list