[education/rkward/kf5] /: Fix plugintests

Thomas Friedrichsmeier null at kde.org
Wed Apr 10 16:12:08 BST 2024


Git commit e01cfbbc3d446e54ddd9310dffd3de69e8988e89 by Thomas Friedrichsmeier.
Committed on 06/04/2024 at 09:43.
Pushed by tfry into branch 'kf5'.

Fix plugintests

M  +7    -0    rkward/rbackend/rkrsupport.cpp
M  +1    -1    tests/CMakeLists.txt

https://invent.kde.org/education/rkward/-/commit/e01cfbbc3d446e54ddd9310dffd3de69e8988e89

diff --git a/rkward/rbackend/rkrsupport.cpp b/rkward/rbackend/rkrsupport.cpp
index 72895a908..615ce2336 100644
--- a/rkward/rbackend/rkrsupport.cpp
+++ b/rkward/rbackend/rkrsupport.cpp
@@ -163,6 +163,7 @@ SEXP RKRSupport::QVariantToSEXP(const QVariant& var) {
 
 QVariant RKRSupport::SEXPToNestedStrings(SEXP from_exp) {
 	RK_TRACE (RBACKEND);
+
 	if (Rf_isVectorList(from_exp)) {  // NOTE: list() in R is a vectorlist in the C API...
 		QVariantList ret;
 		for(int i = 0; i < Rf_length(from_exp); ++i) {
@@ -170,6 +171,12 @@ QVariant RKRSupport::SEXPToNestedStrings(SEXP from_exp) {
 			ret.append(SEXPToNestedStrings(el));
 		}
 		return ret;
+	} else if (Rf_isPairList(from_exp)) {
+		QVariantList ret;
+		for(SEXP cons = from_exp; cons != R_NilValue; cons = CDR(cons)) {
+			ret.append(SEXPToNestedStrings(CAR(cons)));
+		}
+		return ret;
 	}
 	return QVariant(SEXPToStringList(from_exp));
 }
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 805ee80eb..32997c7f1 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -3,5 +3,5 @@
 # SPDX-FileContributor: The RKWard Team <rkward-devel at kde.org>
 # SPDX-License-Identifier: GPL-2.0-or-later
 ADD_CUSTOM_TARGET (plugintests
-	COMMAND ${CMAKE_CURRENT_BINARY_DIR}/../rkward/rkward --evaluate "source\\(\\\"all_tests.R\\\"\\)"
+	COMMAND ${CMAKE_CURRENT_BINARY_DIR}/../bin/rkward --evaluate "source\\(\\\"all_tests.R\\\"\\)"
 	WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})



More information about the rkward-tracker mailing list