Rev 82497 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
## xy.coords() and xyz.coords() -- gets *classed* warningtools::assertWarning(xy.coords(-2:10, log = "y"), verbose=TRUE)op <- options(warn = 2)# ==> warnings are errorssuppressWarnings(xy.coords(-2:10, log = "y"), classes="log_le_0") -> xystopifnot(identical(xy$y, c(rep(NA_real_,3), 1:10)))options(op) # (reverting)tools::assertWarning(xy.coords(-2:10, log = "y"), verbose=TRUE)## PDF metadataoopt <- pdf.options(author = "useR", timestamp = FALSE, producer = FALSE)pdf(f <- tempfile(), title = "test", compress = FALSE); plot.new(); dev.off()pdflines <- readLines(f)stopifnot(c("/Title (test)", "/Author (useR)") %in% pdflines,!startsWith(pdflines, "/CreationDate"),!startsWith(pdflines, "/ModDate"),!startsWith(pdflines, "/Producer"))pdf.options(reset = TRUE)stopifnot(identical(oopt, pdf.options()))