[education/rkward/devel/workspace_output] rkward/rbackend/rpackages/rkwardtests/R: Fix tempfile replacement function in rkwardtests

Thomas Friedrichsmeier null at kde.org
Sun Nov 8 08:43:26 GMT 2020


Git commit 139e5002dc88d092180fbd63efd5cea675183ea4 by Thomas Friedrichsmeier.
Committed on 08/11/2020 at 08:43.
Pushed by tfry into branch 'devel/workspace_output'.

Fix tempfile replacement function in rkwardtests

M  +5    -1    rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-internal.R

https://invent.kde.org/education/rkward/commit/139e5002dc88d092180fbd63efd5cea675183ea4

diff --git a/rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-internal.R b/rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-internal.R
index e0ac020e..945a3d22 100644
--- a/rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-internal.R
+++ b/rkward/rbackend/rpackages/rkwardtests/R/rkwardtests-internal.R
@@ -243,7 +243,11 @@ rktest.initializeEnvironment <- function () {
 	rktest.replace (".rk.make.hr", function (...) list (...))
 
 	# This should make the output of rk.graph.on() fixed
-	rktest.replace ("rk.get.tempfile.name", function (prefix="image", extension=".jpg", directory="") paste (prefix, extension, directory, sep=""))
+	rktest.replace ("rk.get.tempfile.name", function (prefix="image", extension=".jpg", directory="") {
+		ret <- paste (prefix, extension, directory, sep="")
+		names(ret) <- ret
+		ret
+	})
 	options (rk.graphics.type="PNG", rk.graphics.width=480, rk.graphics.height=480)
 
 	# HACK: Override date, so we don't get a difference for each call of rk.header ()




More information about the rkward-tracker mailing list