File: testWriteAndReadEmptyCel.R

package info (click to toggle)
r-bioc-affxparser 1.78.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 6,172 kB
  • sloc: cpp: 70,639; ansic: 2,194; makefile: 5
file content (27 lines) | stat: -rw-r--r-- 989 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
systemR <- function(command="", ..., verbose=FALSE) {
  # Locate the R executable
  Rbin <- file.path(R.home("bin"), "R")
  cmd <- sprintf('%s %s', shQuote(Rbin), command)
  if (verbose) cat("Command: ", cmd, "\n", sep="")
  system(cmd, ...)
} # systemR()


## Explicitly append 'affxparser' to library path
## Needed for covr::coverage()
pd <- packageDescription("affxparser")
libpath <- dirname(dirname(dirname(attr(pd, "file"))))
cmd <- sprintf(' -e ".libPaths(\'%s\'); affxparser:::.testWriteAndReadEmptyCel()"', libpath)
out <- systemR(cmd, intern=TRUE, wait=TRUE, verbose=TRUE)
cat(out, sep="\n")
res <- any(regexpr("COMPLETE", out) != -1)
cat("Test result: ", res, "\n", sep="")
if (!res) {
  stop("affxparser:::.testWriteAndReadEmptyCel() failed.")
}

############################################################################
# HISTORY:
# 2012-09-26
# o Created from tests/testWriteAndReadEmptyCdf.R.
############################################################################