[rkward-cvs] SF.net SVN: rkward:[2907] trunk/rkward/tests/rkward_application_tests.R
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Sun Jun 27 12:09:23 UTC 2010
Revision: 2907
http://rkward.svn.sourceforge.net/rkward/?rev=2907&view=rev
Author: tfry
Date: 2010-06-27 12:09:23 +0000 (Sun, 27 Jun 2010)
Log Message:
-----------
Add automated test for dev.off()-bug
Modified Paths:
--------------
trunk/rkward/tests/rkward_application_tests.R
Modified: trunk/rkward/tests/rkward_application_tests.R
===================================================================
--- trunk/rkward/tests/rkward_application_tests.R 2010-06-27 12:02:13 UTC (rev 2906)
+++ trunk/rkward/tests/rkward_application_tests.R 2010-06-27 12:09:23 UTC (rev 2907)
@@ -63,7 +63,21 @@
load ("../rkward_application_tests_strange_object.RData")
rk.sync.global ()
rk.sync (x)
- }, libraries=c ("XML"))
+ }, libraries=c ("XML")),
+ new ("RKTest", id="dev_off_bug", call=function () {
+ graphics.off()
+ stopifnot (is.null (dev.list ()))
+
+ plot (1, 1); x11(); plot (2, 2)
+
+ Sys.sleep (2) # wait for everything to settle
+ stopifnot (all.equal (as.numeric (dev.list ()), c (2, 3)))
+ dev.off (2)
+ Sys.sleep (2)
+ stopifnot (all.equal (as.numeric (dev.list ()), 3))
+ dev.off ()
+ stopifnot (is.null (dev.list ()))
+ })
# postCalls are run *after* all tests. Use this to clean up
), postCalls = list (
function () {
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