{
"test.driver"<-
function(driver.name, outfile, ...)
{
#
	args <- list(file = outfile, ...)

	driver.name <- as.character(substitute(driver.name))

	if(!exists(driver.name, mode = "function")) {
		cat("Error: no S function", driver.name, "\n")
		return()
	}
	do.call(driver.name, args)
	e <- expression(par(mfrow = c(2, 1)), plot(corn.rain, corn.yield, main
		 = "corn data set", sub = "point plot", xlab = 
		"rainfall in inches", ylab = "yield in bushels"), tsplot(lynx),
		title(main = paste(driver.name, "on", unix("HOSTNAME"), 
		", SHOME =", getenv("SHOME"))), title(sub = date()))
	for(i in e) {
		eval(i)
	}
	dev.off()
	count.bytes <- as.numeric(unix(paste("wc -c <", outfile)))
	invisible(count.bytes)
}
T
}
{
        cat ('Expect message "Generated postscript file ..." vvv\n')
        result <- test.driver(postscript,"ps.test.1") > 7000
        cat ('Expect message "Generated postscript file ..." ^^^\n')
        result
}
unix ("sed -n '$p' < ps.test.1", output.to.S=T) == "%%EOF"
{unix(paste("rm -f ps.test.1"),output.to.S=F);T}
