Created
May 14, 2012 21:54
-
-
Save wch/2697594 to your computer and use it in GitHub Desktop.
Test script for ggplot2 #552: Setting breaks outside of axis ranges fails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This works on mac with
quartz()
. For Linux, usex11()
. (I'm not sure about Windows.)