Skip to content

Instantly share code, notes, and snippets.

@wch
Created May 14, 2012 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wch/2697594 to your computer and use it in GitHub Desktop.
Save wch/2697594 to your computer and use it in GitHub Desktop.
Test script for ggplot2 #552: Setting breaks outside of axis ranges fails
#!/usr/bin/Rscript
# To try out this script, run this, in the top-level ggplot2/ dir:
# git bisect reset
# git bisect start
# git bisect good ggplot2-0.9.0
# git bisect bad ggplot2-0.9.1
# git bisect run bisect/test_break_oob.r
cat("\n===== Running test script ======\n")
library(bisectr)
# A fully automated test
testRun <- function() {
d <- data.frame(x=1:10)
p <- ggplot(d) + geom_point(aes(x=x, y=x)) + scale_y_continuous(breaks=c(-1,5), labels=c("foo", "bar"))
quartz()
print(p)
# If it reaches this point, then it successfully printed. Mark GOOD
return(TRUE)
}
# If load error, mark SKIP
bisect_load_all(".")
# If error, mark BAD
bisect_runtest(testRun, on_error = FALSE)
@wch
Copy link
Author

wch commented May 14, 2012

This works on mac with quartz(). For Linux, use x11(). (I'm not sure about Windows.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment