[rkward-cvs] SF.net SVN: rkward:[2553] trunk/rkward/tests

tfry at users.sourceforge.net tfry at users.sourceforge.net
Fri Jun 26 14:38:06 UTC 2009


Revision: 2553
          http://rkward.svn.sourceforge.net/rkward/?rev=2553&view=rev
Author:   tfry
Date:     2009-06-26 14:38:06 +0000 (Fri, 26 Jun 2009)

Log Message:
-----------
Make sure i18n does not interfere with testing, and trim down the number and size of standard files a bit.

Modified Paths:
--------------
    trunk/rkward/tests/import_export_plugins/RKTestStandard.import_csv.rkout
    trunk/rkward/tests/import_export_plugins/RKTestStandard.load_r_object.rkout
    trunk/rkward/tests/test_framework.R

Removed Paths:
-------------
    trunk/rkward/tests/import_export_plugins/RKTestStandard.import_csv.messages.txt
    trunk/rkward/tests/import_export_plugins/RKTestStandard.import_csv_overwrite.rkcommands.R
    trunk/rkward/tests/import_export_plugins/RKTestStandard.load_r_object.messages.txt

Modified: trunk/rkward/tests/import_export_plugins/RKTestStandard.import_csv.rkout
===================================================================
--- trunk/rkward/tests/import_export_plugins/RKTestStandard.import_csv.rkout	2009-06-26 14:32:58 UTC (rev 2552)
+++ trunk/rkward/tests/import_export_plugins/RKTestStandard.import_csv.rkout	2009-06-26 14:38:06 UTC (rev 2553)
@@ -4,4 +4,3 @@
 <li>Import as: women</li>
 </ul>
 DATE<br>
-<a href="rkward://runplugin/rkward::import_csv/allow_escapes.state=%0ablanklinesskip.state=TRUE%0acheckname.state=TRUE%0acolclass.string=%0acolname.string=%0adec.string='.'%0adoedit.state=0%0afile.selection=women.csv%0aflush.state=%0aisrow.state=true%0ana.text=NA%0aname.selection=women%0anomrow.text=1%0anrows.text=-1%0aquick.string=csv%0aquote.string='%5c%5c%5c%22'%0arowname.string=rowcol%0asep.string=','%0askip.text=0%0astrings_as_factors.string=%0astripwhite.state=FALSE">Run again</a><hr>

Modified: trunk/rkward/tests/import_export_plugins/RKTestStandard.load_r_object.rkout
===================================================================
--- trunk/rkward/tests/import_export_plugins/RKTestStandard.load_r_object.rkout	2009-06-26 14:32:58 UTC (rev 2552)
+++ trunk/rkward/tests/import_export_plugins/RKTestStandard.load_r_object.rkout	2009-06-26 14:38:06 UTC (rev 2553)
@@ -4,4 +4,3 @@
 <li>Import to environment: globalenv()</li>
 </ul>
 DATE<br>
-<a href="rkward://runplugin/rkward::load_r_object/file.selection=women.RData%0aother_env.state=0">Run again</a><hr>

Modified: trunk/rkward/tests/test_framework.R
===================================================================
--- trunk/rkward/tests/test_framework.R	2009-06-26 14:32:58 UTC (rev 2552)
+++ trunk/rkward/tests/test_framework.R	2009-06-26 14:38:06 UTC (rev 2553)
@@ -71,6 +71,11 @@
 # returns true, if file corresponds to standard.
 rktest.compare.against.standard <- function (file) {
 	standard_file <- gsub ("^(.*\\/)([^\\/]*)$", "\\1RKTestStandard\\.\\2", file)
+	if (file.exists (file)) {
+		# purge empty files
+		info <- file.info (file)
+		if (info$size[1] == 0) file.remove (file)
+	}
 	if (!file.exists (file)) {
 		# if neither exists, that means both files are empty
 		if (!file.exists (standard_file)) return (TRUE)
@@ -218,8 +223,16 @@
 	.rk.cat.output ("\", submit.mode=\"submit\")</pre>")
 }
 
+## Initialize test environment
+# By default .rk.rerun.plugin.link() and .rk.make.hr() are silenced during the test runs
+.rk.rerun.plugin.link <- .rk.make.hr <- function (...) { list (...) }
+
 # HACK: Override date, so we don't get a difference for each call of rk.header ()
 # TODO: implement a clean solution inside rk.header()
 date <- function () {
 	return ("DATE")
 }
+
+# Make sure i18n does not get in the way
+invisible (Sys.setenv (LANGUAGE="C"))
+invisible (Sys.setlocale ("LC_MESSAGES", "C"))


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